[2.1] Justify unreachable code in example

This commit is contained in:
Kody Stribrny 2026-02-20 13:43:34 -08:00
parent 1688966a94
commit 501ce1fadc

View file

@ -18,14 +18,6 @@ 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
@ -162,6 +154,29 @@ Certain deviating code is left unsurpressed for awarness. This code should
not be considered for usage in MISRA compliant applications. These violations
will be reported when audited by a MISRA-checking static analysis tool.
#### Dir 2.1
MISRA C:2012 Dir 2.1: A project shall not contain unreachable code
_Ref 2.1_
- Simplified example contains unreachable code for demonstration of
freertos scheduler. A production implemenation should not contain
this.
Affected Files:
- examples/cmake_example/main.c
#### 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.
Affected Files:
- tasks.c
#### Rule 21.3
MISRA C-2012 Rule 21.3: The memory allocation and deallocation functions of