Skip to content

Commit 510a5f0

Browse files
Fix for mismatched op-types on line 3937 on tasks.c
1 parent 9697f8c commit 510a5f0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

MISRA.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ _Ref 8.6.1_
5252
definitions or no definition. FreeRTOS hook functions are implemented in
5353
the application and therefore, have no definition in the Kernel code.
5454

55+
#### Rule 10.4
56+
57+
MISRA C:2012 Rule 10.4
58+
59+
Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category
60+
61+
_Ref 10.4.1_
62+
- This is a basic comparison of positive values only.
63+
5564
#### Rule 11.1
5665
MISRA C:2012 Rule 11.1: Conversions shall not be performed between a pointer to
5766
function and any other type.

tasks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3935,6 +3935,9 @@ void vTaskSuspendAll( void )
39353935
* processed. */
39363936
xReturn = 0;
39373937
}
3938+
/* MISRA Ref 10.4.1 [Mismatched Operand Types] */
3939+
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-104 */
3940+
/* codesonar[misra_c_2012_rule_10_4_violation] */
39383941
else if( uxHigherPriorityReadyTasks != pdFALSE )
39393942
{
39403943
/* There are tasks in the Ready state that have a priority above the

0 commit comments

Comments
 (0)