Is there a bug regarding MISRA Rule 2.2 (Dead Code)?
Show older comments
MISRA-C 2012 Rule 2.2 says: There shall be no dead code.
There is an example appended to the text which explains the rule.
To keep this question as short as possible, I have shortened the example down to:
```
void f(void){
uint16_t x;
/*...*/
x=3; // Non-Compliant
}
```
However, Polyspace is not able to detect this assignment as dead code.
To be clear: MISRA-C 2012 provides the example above for a dead code violation and Polyspace does not find this violation.
This should be a bug. I am not sure if this is the right place to post/ask this. Is there a bug-tracker or any place where I can file an issue for this?
Am I missing something here?
Accepted Answer
More Answers (0)
Categories
Find more on Polyspace Code Prover in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!