I guess uninitvar was not made especially for the Misra checker and is therefore missing.
It does not find all problems yet.
In the Misra document it says that jumping over initializations is also forbidden.
But Cppcheck does not warn for such code:
misra9.1.c
Rule 9.1 is not marked as 'supported' on the page:
http://cppcheck.sourceforge.net/misra.php
The following code generates an error that is detected by cppcheck:
Last edit: Jeroen Doggen 2019-02-21
I guess
uninitvar
was not made especially for the Misra checker and is therefore missing.It does not find all problems yet.
In the Misra document it says that jumping over initializations is also forbidden.
But Cppcheck does not warn for such code:
misra9.1.c
gcc seems to initialize x to 0, but one can not rely on this i guess:
$ gcc -o misra9.1 misra9.1.c $ ./misra9.1 1