mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17:44 -04:00
Address a few MISRA 2.2 violations in FreeRTOS_IP.c (#230)
* Make changes for MISRA rule 2.2 * Add comments to explain changes * Fix a typo * Actually fix a typo I missed a spot in the previous commit.
This commit is contained in:
parent
e2ab092351
commit
18d238ad5c
1 changed files with 10 additions and 0 deletions
|
@ -2105,6 +2105,11 @@ uint8_t ucProtocol;
|
|||
if( xResult != pdPASS )
|
||||
{
|
||||
FreeRTOS_printf( ( "xCheckSizeFields: location %ld\n", xLocation ) );
|
||||
|
||||
/* If FreeRTOS_printf is not defined, not using xLocation will be a violation of MISRA
|
||||
* rule 2.2 as the value assigned to xLocation will not be used. The below statement uses
|
||||
* the variable without modifying the logic of the source. */
|
||||
( void ) xLocation;
|
||||
}
|
||||
|
||||
return xResult;
|
||||
|
@ -2379,6 +2384,11 @@ BaseType_t location = 0;
|
|||
( usChecksum == ipINVALID_LENGTH ) )
|
||||
{
|
||||
FreeRTOS_printf( ( "CRC error: %04x location %ld\n", usChecksum, location ) );
|
||||
|
||||
/* If FreeRTOS_printf is not defined, not using 'location' will be a violation of MISRA
|
||||
* rule 2.2 as the value assigned to 'location' will not be used. The below statement uses
|
||||
* the variable without modifying the logic of the source. */
|
||||
( void ) location;
|
||||
}
|
||||
|
||||
return usChecksum;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue