I identified a warning with the cppcheck GUI in my program. When I use the the CLI to find the same warning, it doesn't show up.
I can provide this small sample code:
Do I do something wrong? I just want to find the same warnings with CLI as are shown in the GUI if I have enabled warnings there.
If I use the --enable=style option, there are shown too much other messages, which I don't want to display with the "warnings-check".
Thanks and best regards
Julian
Edit: Formatting
Last edit: Julian Wörle 2020-10-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey everybody,
I'm using cppcheck version 2.2
I identified a warning with the cppcheck GUI in my program. When I use the the CLI to find the same warning, it doesn't show up.
I can provide this small sample code:
The GUI informs me with a warning about the missing
break;
aftercase 0
If I execute the following command with CLI no warnings are shown:
If I execute the following command in the CLI, I get the warning
Output:
Do I do something wrong? I just want to find the same warnings with CLI as are shown in the GUI if I have enabled warnings there.
If I use the
--enable=style
option, there are shown too much other messages, which I don't want to display with the "warnings-check".Thanks and best regards
Julian
Edit: Formatting
Last edit: Julian Wörle 2020-10-14
Its a bug in Cppcheck. I can reproduce.
I have created this ticket: https://trac.cppcheck.net/ticket/9950
Thank you for your answer and for creating the ticket :)