diff --git a/source/FreeRTOS_IP_Utils.c b/source/FreeRTOS_IP_Utils.c index 9762f3933c..35b1d525df 100644 --- a/source/FreeRTOS_IP_Utils.c +++ b/source/FreeRTOS_IP_Utils.c @@ -1151,7 +1151,7 @@ const char * FreeRTOS_strerror_r( BaseType_t xErrnum, /* MISRA Ref 21.6.1 [snprintf and logging] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-216 */ /* coverity[misra_c_2012_rule_21_6_violation] */ - ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int ) xErrnum ); + ( void ) snprintf( pcBuffer, uxLength, "Errno %d", xErrnum ); pcName = NULL; break; } diff --git a/source/FreeRTOS_TCP_State_Handling.c b/source/FreeRTOS_TCP_State_Handling.c index 6fc3666998..1e1b70f3f6 100644 --- a/source/FreeRTOS_TCP_State_Handling.c +++ b/source/FreeRTOS_TCP_State_Handling.c @@ -371,7 +371,7 @@ uint8_t ucExpect = tcpTCP_FLAG_ACK; const uint8_t ucFlagsMask = tcpTCP_FLAG_ACK | tcpTCP_FLAG_RST | tcpTCP_FLAG_SYN | tcpTCP_FLAG_FIN; - if( pxSocket->u.xTCP.eTCPState == ( uint8_t ) eCONNECT_SYN ) + if( pxSocket->u.xTCP.eTCPState == eCONNECT_SYN ) { ucExpect |= tcpTCP_FLAG_SYN; } @@ -405,7 +405,7 @@ pxTCPWindow->usPeerPortNumber = pxSocket->u.xTCP.usRemotePort; pxTCPWindow->usOurPortNumber = pxSocket->usLocalPort; - if( pxSocket->u.xTCP.eTCPState == ( uint8_t ) eCONNECT_SYN ) + if( pxSocket->u.xTCP.eTCPState == eCONNECT_SYN ) { /* Map the Last packet onto the ProtocolHeader_t struct for easy access to the fields. */ @@ -452,7 +452,7 @@ } #endif /* ipconfigUSE_TCP_WIN */ - if( ( pxSocket->u.xTCP.eTCPState == ( EventBits_t ) eCONNECT_SYN ) || ( ulReceiveLength != 0U ) ) + if( ( pxSocket->u.xTCP.eTCPState == eCONNECT_SYN ) || ( ulReceiveLength != 0U ) ) { pxTCPHeader->ucTCPFlags = tcpTCP_FLAG_ACK; @@ -735,7 +735,7 @@ * pucRecvData will point to the first byte of the TCP payload. */ ulReceiveLength = ( uint32_t ) prvCheckRxData( *ppxNetworkBuffer, &pucRecvData ); - if( pxSocket->u.xTCP.eTCPState >= ( uint8_t ) eESTABLISHED ) + if( pxSocket->u.xTCP.eTCPState >= eESTABLISHED ) { if( pxTCPWindow->rx.ulCurrentSequenceNumber == ( ulSequenceNumber + 1U ) ) { diff --git a/test/Coverity/ConfigFiles/FreeRTOSConfig.h b/test/Coverity/ConfigFiles/FreeRTOSConfig.h index 0ed7542f31..9c7651bf96 100644 --- a/test/Coverity/ConfigFiles/FreeRTOSConfig.h +++ b/test/Coverity/ConfigFiles/FreeRTOSConfig.h @@ -45,8 +45,8 @@ #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 1 #define configUSE_DAEMON_TASK_STARTUP_HOOK 1 -#define configTICK_RATE_HZ ( 1000U ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ -#define configMINIMAL_STACK_SIZE ( 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */ +#define configTICK_RATE_HZ ( 1000U ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ +#define configMINIMAL_STACK_SIZE ( ( configSTACK_DEPTH_TYPE ) 70U ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 52 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) #define configUSE_TRACE_FACILITY 1