[2.2] Disclose dead code warning

This commit is contained in:
Kody Stribrny 2026-02-20 13:39:41 -08:00
parent edbeef2a72
commit 1688966a94
2 changed files with 12 additions and 0 deletions

View file

@ -18,7 +18,16 @@ with ( Assuming rule 8.4 violation; with justification in point 1 ):
grep 'MISRA Ref 8.4.1' . -rI 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 #### Dir 4.7
MISRA C:2012 Dir 4.7: If a function returns error information, then that error MISRA C:2012 Dir 4.7: If a function returns error information, then that error
information shall be tested. information shall be tested.

View file

@ -3839,6 +3839,9 @@ void vTaskEndScheduler( void )
/* This function must be called from a task and the application is /* This function must be called from a task and the application is
* responsible for deleting that task after the scheduler is stopped. */ * 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(); vPortEndScheduler();
traceRETURN_vTaskEndScheduler(); traceRETURN_vTaskEndScheduler();