diff --git a/MISRA.md b/MISRA.md index 67fcde719..abe2bf92c 100644 --- a/MISRA.md +++ b/MISRA.md @@ -18,7 +18,16 @@ with ( Assuming rule 8.4 violation; with justification in point 1 ): grep 'MISRA Ref 8.4.1' . -rI ``` +#### Dir 2.2 + +MISRA C:2012 Dir 2.2: There shall be no dead code. + +_Ref 2.2_ + - `vPortEndScheduler` is erroneously determined to be dead code due to + simplified verification port. + #### Dir 4.7 + MISRA C:2012 Dir 4.7: If a function returns error information, then that error information shall be tested. diff --git a/tasks.c b/tasks.c index c596c475f..b570600a3 100644 --- a/tasks.c +++ b/tasks.c @@ -3839,6 +3839,9 @@ void vTaskEndScheduler( void ) /* This function must be called from a task and the application is * responsible for deleting that task after the scheduler is stopped. */ + /* MISRA Ref 2.2 [No dead code] */ + /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#dir-22 */ + /* coverity[misra_c_2012_directive_2_2_violation] */ vPortEndScheduler(); traceRETURN_vTaskEndScheduler();