Reputation: 21
I checked my program with cppcheck with the following command.
cppcheck --enable=all --inconclusive --xml-version=2 --output-file=getopt.c.txt -v getopt.c
It gives me some ConfigurationNotChecked erros. I searched online but don't know what it means. Some errors are below.
<error id="ConfigurationNotChecked" severity="information" msg="Skipping configuration '__STDC__=0;const' since the value of 'const' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly." verbose="Skipping configuration '__STDC__=0;const' since the value of 'const' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.">
<location file="getopt.c" line="194" column="0"/>
</error>
<error id="ConfigurationNotChecked" severity="information" msg="Skipping configuration '__STDC__=0;const' since the value of 'const' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly." verbose="Skipping configuration '__STDC__=0;const' since the value of 'const' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.">
<location file="getopt.c" line="208" column="0"/>
</error>
<error id="ConfigurationNotChecked" severity="information" msg="Skipping configuration '__STDC__=0;const' since the value of 'const' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly." verbose="Skipping configuration '__STDC__=0;const' since the value of 'const' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.">
<location file="getopt.c" line="317" column="0"/>
</error>
It says use -D to check it. How can I use it with my command that i wrote above. I want to get information about what this error is. Also does my cppcheck command giving me all the possible errors that it can find or am i missing some argument.
Upvotes: 2
Views: 987
Reputation: 3037
I am a Cppcheck developer. That is very weird. This sounds like a Cppcheck bug.
You should not use -D
in this case.
Ideally I would like that you create a short code example that reproduce the problem. Maybe you can extract some code in getopt.c around line 190 and see if you still get such information message.
Upvotes: 1
Reputation: 4576
The manpage describes this
-D<id>
By default Cppcheck checks all configurations. Use -D to limit the checking. When -D is used the checking is limited to the given configuration. Example: -DDEBUG=1
-D__cplusplus
Upvotes: 0