Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISRA compliance changes for FreeRTOS+TCP headers #165

Merged
merged 6 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_IP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 */
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down