mirror of
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP
synced 2025-10-20 22:10:04 +08:00
Fix MISRA violations (#1159)
This commit is contained in:
@@ -330,6 +330,7 @@
|
||||
#if ( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
|
||||
uxResult = DNS_ReadNameField( &xSet,
|
||||
sizeof( xSet.pcName ) );
|
||||
( void ) uxResult;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -359,6 +360,7 @@
|
||||
{
|
||||
uxResult = DNS_ReadNameField( &xSet,
|
||||
sizeof( xSet.pcName ) );
|
||||
( void ) uxResult;
|
||||
}
|
||||
else
|
||||
#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */
|
||||
|
@@ -489,7 +489,7 @@
|
||||
if( pxEndPoint->xRAData.bits.bRouterReplied != pdFALSE_UNSIGNED )
|
||||
{
|
||||
/* Obtained configuration from a router. */
|
||||
uxNewReloadTime = pdMS_TO_TICKS( 1000U * pxEndPoint->xRAData.ulPreferredLifeTime );
|
||||
uxNewReloadTime = pdMS_TO_TICKS( ( 1000U * ( uint64_t ) pxEndPoint->xRAData.ulPreferredLifeTime ) );
|
||||
pxEndPoint->xRAData.eRAState = eRAStatePreLease;
|
||||
iptraceRA_SUCCEEDED( &( pxEndPoint->ipv6_settings.xIPAddress ) );
|
||||
FreeRTOS_printf( ( "RA: succeeded, using IP address %pip Reload after %u seconds\n",
|
||||
|
@@ -2893,6 +2893,8 @@ BaseType_t FreeRTOS_setsockopt( Socket_t xSocket,
|
||||
/* The type cast of the pointer expression "A" to
|
||||
* type "B" removes const qualifier from the pointed to type. */
|
||||
|
||||
ipconfigISO_STRICTNESS_VIOLATION_START;
|
||||
|
||||
/* MISRA Ref 11.8.1 [Function pointer and use of const pointer] */
|
||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-118 */
|
||||
|
||||
@@ -2901,7 +2903,6 @@ BaseType_t FreeRTOS_setsockopt( Socket_t xSocket,
|
||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-111 */
|
||||
/* coverity[misra_c_2012_rule_11_8_violation] */
|
||||
/* coverity[misra_c_2012_rule_11_1_violation] */
|
||||
ipconfigISO_STRICTNESS_VIOLATION_START;
|
||||
pxSocket->pxUserWakeCallback = ( SocketWakeupCallback_t ) pvOptionValue;
|
||||
ipconfigISO_STRICTNESS_VIOLATION_END;
|
||||
xReturn = 0;
|
||||
|
@@ -277,6 +277,10 @@
|
||||
static BaseType_t vTCPRemoveTCPChild( const FreeRTOS_Socket_t * pxChildSocket )
|
||||
{
|
||||
BaseType_t xReturn = pdFALSE;
|
||||
|
||||
/* MISRA Ref 11.3.1 [Misaligned access] */
|
||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */
|
||||
/* coverity[misra_c_2012_rule_11_3_violation] */
|
||||
const ListItem_t * pxEnd = ( ( const ListItem_t * ) &( xBoundTCPSocketsList.xListEnd ) );
|
||||
|
||||
/* MISRA Ref 11.3.1 [Misaligned access] */
|
||||
|
@@ -200,7 +200,7 @@ FreeRTOS_Socket_t * prvHandleListen_IPV4( FreeRTOS_Socket_t * pxSocket,
|
||||
/* Close the socket if it was newly created. */
|
||||
if( xIsNewSocket == pdTRUE )
|
||||
{
|
||||
vSocketClose( pxReturn );
|
||||
( void ) vSocketClose( pxReturn );
|
||||
}
|
||||
|
||||
pxReturn = NULL;
|
||||
|
@@ -200,7 +200,7 @@ FreeRTOS_Socket_t * prvHandleListen_IPV6( FreeRTOS_Socket_t * pxSocket,
|
||||
/* Close the socket if it was newly created. */
|
||||
if( xIsNewSocket == pdTRUE )
|
||||
{
|
||||
vSocketClose( pxReturn );
|
||||
( void ) vSocketClose( pxReturn );
|
||||
}
|
||||
|
||||
pxReturn = NULL;
|
||||
|
Reference in New Issue
Block a user