Skip to content

Commit b99f0ea

Browse files
committed
[2.2] Disclose dead code warning
1 parent 9096899 commit b99f0ea

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

MISRA.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ with ( Assuming rule 8.4 violation; with justification in point 1 ):
1818
grep 'MISRA Ref 8.4.1' . -rI
1919
```
2020

21+
#### Dir 2.2
22+
23+
MISRA C:2012 Dir 2.2: There shall be no dead code.
24+
25+
_Ref 2.2_
26+
- `vPortEndScheduler` is erroneously determined to be dead code due to
27+
simplified verification port.
28+
2129
#### Dir 4.7
30+
2231
MISRA C:2012 Dir 4.7: If a function returns error information, then that error
2332
information shall be tested.
2433

tasks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3839,6 +3839,9 @@ void vTaskEndScheduler( void )
38393839

38403840
/* This function must be called from a task and the application is
38413841
* responsible for deleting that task after the scheduler is stopped. */
3842+
/* MISRA Ref 2.2 [No dead code] */
3843+
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#dir-22 */
3844+
/* coverity[misra_c_2012_directive_2_2_violation] */
38423845
vPortEndScheduler();
38433846

38443847
traceRETURN_vTaskEndScheduler();

0 commit comments

Comments
 (0)