diff --git a/FreeRTOS_IP.c b/FreeRTOS_IP.c index 9b57525c4..2cf9f5d7f 100644 --- a/FreeRTOS_IP.c +++ b/FreeRTOS_IP.c @@ -354,6 +354,8 @@ static BaseType_t xIPTaskInitialised = pdFALSE; /*-----------------------------------------------------------*/ +#include "random.h" + /* Coverity wants to make pvParameters const, which would make it incompatible. Leave the * function signature as is. */ @@ -434,6 +436,8 @@ static void prvIPTask( void * pvParameters ) iptraceNETWORK_EVENT_RECEIVED( xReceivedEvent.eEventType ); + vAddBytesToPool( xReceivedEvent.eEventType ); + switch( xReceivedEvent.eEventType ) { case eNetworkDownEvent: diff --git a/FreeRTOS_TCP_IP.c b/FreeRTOS_TCP_IP.c index 314d2b24b..c62ca7e5a 100644 --- a/FreeRTOS_TCP_IP.c +++ b/FreeRTOS_TCP_IP.c @@ -1498,6 +1498,12 @@ uxIndex += ( size_t ) ucLen; } } + + #if ( ipconfigUSE_TCP_WIN == 0 ) + /* Avoid compiler warnings when TCP window is not used. */ + ( void ) xHasSYNFlag; + #endif + return uxIndex; } /*-----------------------------------------------------------*/ @@ -2595,11 +2601,12 @@ TCPHeader_t * pxTCPHeader = &pxProtocolHeaders->xTCPHeader; const TCPWindow_t * pxTCPWindow = &pxSocket->u.xTCP.xTCPWindow; UBaseType_t uxOptionsLength = pxTCPWindow->ucOptionLength; - /* memcpy() helper variables for MISRA Rule 21.15 compliance*/ - const void * pvCopySource; - void * pvCopyDest; #if ( ipconfigUSE_TCP_WIN == 1 ) + /* memcpy() helper variables for MISRA Rule 21.15 compliance*/ + const void * pvCopySource; + void * pvCopyDest; + if( uxOptionsLength != 0U ) { /* TCP options must be sent because a packet which is out-of-order diff --git a/tools/tcp_utilities/tcp_mem_stats.c b/tools/tcp_utilities/tcp_mem_stats.c index b3aa87c54..6a426339d 100644 --- a/tools/tcp_utilities/tcp_mem_stats.c +++ b/tools/tcp_utilities/tcp_mem_stats.c @@ -49,7 +49,7 @@ #ifndef ipconfigTCP_MEM_STATS_MAX_ALLOCATION #define ipconfigTCP_MEM_STATS_MAX_ALLOCATION 128u - #pragma warning "ipconfigTCP_MEM_STATS_MAX_ALLOCATION undefined?" +// #pragma warning "ipconfigTCP_MEM_STATS_MAX_ALLOCATION undefined?" #endif #if ( ipconfigUSE_TCP_MEM_STATS != 0 )