MISRA compliance changes for FreeRTOS+TCP headers (#165)

* misra changes

* Update FreeRTOS_IP_Private.h

* Update FreeRTOS_IP_Private.h
This commit is contained in:
Aniruddha Kanhere
2020-07-29 16:15:38 -07:00
committed by GitHub
parent e903ac0fed
commit 07cf5e07e4
2 changed files with 6 additions and 8 deletions

View File

@ -44,7 +44,6 @@ extern "C" {
let Coverity know about it. */
#ifdef portINLINE
/* coverity[misra_c_2012_rule_20_5_violation] */
/* The usage of #undef violates the rule. */
#undef portINLINE
@ -70,8 +69,7 @@ are not ( yet ) supported. */
* Generate a randomized TCP Initial Sequence Number per RFC.
* This function must be provided by the application builder.
*/
/* coverity[misra_c_2012_rule_8_6_violation] */
/* "ulApplicationGetNextSequenceNumber" is declared but never defined. */
/* This function is defined generally by the application. */
extern uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress,
uint16_t usSourcePort,
uint32_t ulDestinationAddress,
@ -283,7 +281,6 @@ void FreeRTOS_ReleaseUDPPayloadBuffer( void const * pvBuffer );
const uint8_t * FreeRTOS_GetMACAddress( void );
void FreeRTOS_UpdateMACAddress( const uint8_t ucMACAddress[ipMAC_ADDRESS_LENGTH_BYTES] );
#if( ipconfigUSE_NETWORK_EVENT_HOOK == 1 )
/* coverity[misra_c_2012_rule_8_6_violation] */
/* This function shall be defined by the application. */
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent );
#endif
@ -335,7 +332,7 @@ void vSetMultiCastIPv4MacAddress( uint32_t ulIPAddress, MACAddress_t *pxMACAddre
have much use, except that a device can be found in a router along with its
name. If this option is used the callback below must be provided by the
application writer to return a const string, denoting the device's name. */
/* coverity[misra_c_2012_rule_8_6_violation], typically defined in a user module. */
/* Typically this function is defined in a user module. */
const char *pcApplicationHostnameHook( void );
#endif /* ipconfigDHCP_REGISTER_HOSTNAME */
@ -350,7 +347,6 @@ implementation of it.
The macro's ipconfigRAND32() and configRAND32() are not in use anymore. */
/* "xApplicationGetRandomNumber" is declared but never defined, because it may
be defined in a user module. */
/* coverity[misra_c_2012_rule_8_6_violation] */
extern BaseType_t xApplicationGetRandomNumber( uint32_t *pulNumber );
/* For backward compatibility define old structure names to the newer equivalent

View File

@ -722,9 +722,11 @@ int32_t lTCPAddRxdata(FreeRTOS_Socket_t *pxSocket, size_t uxOffset, const uint8_
void vSocketWakeUpUser( FreeRTOS_Socket_t *pxSocket );
/*
* Some helping function, their meaning should be clear
* Some helping function, their meaning should be clear.
* Going by MISRA rules, these utility functions should not be defined
* if they are not being used anywhwere. But their use depends on the
* application and hence these functions are defined unconditionally.
*/
/* coverity[misra_c_2012_rule_2_2_violation] */
static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr);
static portINLINE uint32_t ulChar2u32 (const uint8_t *apChr)
{