mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 17:57:44 -04:00
MISRA v5 (#272)
This commit is contained in:
parent
d977f21940
commit
50dc98a5a6
4 changed files with 11 additions and 7 deletions
|
@ -301,7 +301,9 @@ FreeRTOS_Socket_t const *pxSocket = NULL;
|
||||||
Socket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol )
|
Socket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol )
|
||||||
{
|
{
|
||||||
FreeRTOS_Socket_t *pxSocket;
|
FreeRTOS_Socket_t *pxSocket;
|
||||||
size_t uxSocketSize = 0;
|
|
||||||
|
/* Note that this value will be over-written by the call to prvDetermineSocketSize. */
|
||||||
|
size_t uxSocketSize = 1;
|
||||||
EventGroupHandle_t xEventGroup;
|
EventGroupHandle_t xEventGroup;
|
||||||
Socket_t xReturn;
|
Socket_t xReturn;
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,12 @@ extern "C" {
|
||||||
/* NOTE PUBLIC API FUNCTIONS. */
|
/* NOTE PUBLIC API FUNCTIONS. */
|
||||||
BaseType_t xNetworkBuffersInitialise( void );
|
BaseType_t xNetworkBuffersInitialise( void );
|
||||||
NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );
|
NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );
|
||||||
|
|
||||||
|
/* The definition of the below function is only available if BufferAllocation_2.c has been linked into the source. */
|
||||||
NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes );
|
NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes );
|
||||||
void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||||
|
|
||||||
|
/* The definition of the below function is only available if BufferAllocation_2.c has been linked into the source. */
|
||||||
BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||||
uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes );
|
uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes );
|
||||||
void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer );
|
void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer );
|
||||||
|
|
|
@ -33,13 +33,11 @@ extern "C" {
|
||||||
/* INTERNAL API FUNCTIONS. */
|
/* INTERNAL API FUNCTIONS. */
|
||||||
BaseType_t xNetworkInterfaceInitialise( void );
|
BaseType_t xNetworkInterfaceInitialise( void );
|
||||||
BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend );
|
BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend );
|
||||||
/* coverity[misra_c_2012_rule_8_6_violation] */
|
|
||||||
/* "vNetworkInterfaceAllocateRAMToBuffers" is declared but never defined.
|
/* The following function is defined only when BufferAllocation_1.c is linked in the project. */
|
||||||
The following function is only used when BufferAllocation_1.c is linked in the project. */
|
|
||||||
void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] );
|
void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] );
|
||||||
|
|
||||||
/* "xGetPhyLinkStatus" is provided by the network driver. */
|
/* The following function is defined only when BufferAllocation_1.c is linked in the project. */
|
||||||
/* coverity[misra_c_2012_rule_8_6_violation] */
|
|
||||||
BaseType_t xGetPhyLinkStatus( void );
|
BaseType_t xGetPhyLinkStatus( void );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -386,7 +386,7 @@ uint8_t *pucBuffer;
|
||||||
xNewSizeBytes = xOriginalLength;
|
xNewSizeBytes = xOriginalLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy( pucBuffer - ipBUFFER_PADDING, pxNetworkBuffer->pucEthernetBuffer - ipBUFFER_PADDING, xNewSizeBytes );
|
( void ) memcpy( pucBuffer - ipBUFFER_PADDING, pxNetworkBuffer->pucEthernetBuffer - ipBUFFER_PADDING, xNewSizeBytes );
|
||||||
vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer );
|
vReleaseNetworkBuffer( pxNetworkBuffer->pucEthernetBuffer );
|
||||||
pxNetworkBuffer->pucEthernetBuffer = pucBuffer;
|
pxNetworkBuffer->pucEthernetBuffer = pucBuffer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue