I have a suppression-list file and it is working fine. However, sometimes the suppression doesn't kick in for some reason.
Here is an example:
Snip from xml output file:
<errorid="misra-c2012-5.6"severity="style"msg="A typedef name shall be a unique identifier"verbose="A typedef name shall be a unique identifier"><locationfile="lib\src\Misc\Typedef.c"line="44"column="5"/></error><errorid="misra-c2012-5.6"severity="style"msg="A typedef name shall be a unique identifier"verbose="A typedef name shall be a unique identifier"><locationfile="lib\src\Misc\Typedef.c"line="43"column="5"/></error><errorid="misra-c2012-5.6"severity="style"msg="A typedef name shall be a unique identifier"verbose="A typedef name shall be a unique identifier"><locationfile="lib\src\Misc\Typedef.c"line="57"column="5"/></error><errorid="misra-c2012-5.6"severity="style"msg="A typedef name shall be a unique identifier"verbose="A typedef name shall be a unique identifier"><locationfile="lib\src\Misc\Typedef.c"line="50"column="5"/></error>
Add suppression to the misra-suppression.txt file:
misra-c2012-5.6:lib/src/Misc/Typedef.c
The violations from the xml output disappeared (as expected) but I get this error instead:
Hi,
I have a suppression-list file and it is working fine. However, sometimes the suppression doesn't kick in for some reason.
Here is an example:
Snip from xml output file:
Add suppression to the
misra-suppression.txt
file:The violations from the xml output disappeared (as expected) but I get this error instead:
Here is the commandline:
cppcheck 2.16
Does anyone have any ideas on why this occur?
Last edit: Mikael Heden 2025-02-17
unmatchedSuppression
is currently broken in many ways. I will take a look after https://github.com/danmar/cppcheck/pull/5647 has been merged.Will be a bit longer until I look into this issue. I am currently focused on finally dogfooding unmatched suppressions.