Hello, I cannot get inline suppression of unusedFunction errors to work when passing compile_commands.json to cppcheck. It works alright when I just pass a list of files, or when using the --suppress-xml or --suppressions-list arguments.
It just doesn't work for:
unusedFunction errors
when using compile_commands.json
when using inline suppression
I'm attaching a minimal example:
If I run (inside the minimal-example folder):
cppcheck --project=compile_commands.json --enable=all --inline-suppr
I get an unusedFunction error.
If I run:
cppcheck --project=compile_commands.json --enable=all --suppress-xml=suppressions.xml --inline-suppr
or
cppcheck --enable=all --inline-suppr example.c
I don't get any errors.
Could this be a bug? Or is there a way to get inline supporession working when using the compile commands file?
Thanks! Sounds like a bug, I created a ticket: https://trac.cppcheck.net/ticket/9567
Log in to post a comment.
Hello,
I cannot get inline suppression of unusedFunction errors to work when passing compile_commands.json to cppcheck. It works alright when I just pass a list of files, or when using the --suppress-xml or --suppressions-list arguments.
It just doesn't work for:
unusedFunction errors
when using compile_commands.json
when using inline suppression
I'm attaching a minimal example:
If I run (inside the minimal-example folder):
I get an unusedFunction error.
If I run:
or
I don't get any errors.
Could this be a bug? Or is there a way to get inline supporession working when using the compile commands file?
Last edit: Viktor Kajml 2020-01-06
Thanks! Sounds like a bug, I created a ticket: https://trac.cppcheck.net/ticket/9567