From 510a5f04fcdd15ff91c553ea012d376befac24f1 Mon Sep 17 00:00:00 2001 From: Mark Hermeling Date: Tue, 21 May 2024 11:24:40 -0400 Subject: [PATCH] Fix for mismatched op-types on line 3937 on tasks.c --- MISRA.md | 9 +++++++++ tasks.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/MISRA.md b/MISRA.md index 4355ec678..b514fbe73 100644 --- a/MISRA.md +++ b/MISRA.md @@ -52,6 +52,15 @@ _Ref 8.6.1_ definitions or no definition. FreeRTOS hook functions are implemented in the application and therefore, have no definition in the Kernel code. +#### Rule 10.4 + +MISRA C:2012 Rule 10.4 + +Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category + +_Ref 10.4.1_ + - This is a basic comparison of positive values only. + #### Rule 11.1 MISRA C:2012 Rule 11.1: Conversions shall not be performed between a pointer to function and any other type. diff --git a/tasks.c b/tasks.c index db158f655..5c4c16321 100644 --- a/tasks.c +++ b/tasks.c @@ -3935,6 +3935,9 @@ void vTaskSuspendAll( void ) * processed. */ xReturn = 0; } + /* MISRA Ref 10.4.1 [Mismatched Operand Types] */ + /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-104 */ + /* codesonar[misra_c_2012_rule_10_4_violation] */ else if( uxHigherPriorityReadyTasks != pdFALSE ) { /* There are tasks in the Ready state that have a priority above the