带有Cppcheck的ConfigurationNotcheck错误
我用以下命令用cppcheck检查了我的程序带有Cppcheck的ConfigurationNotcheck错误,c,debugging,cppcheck,C,Debugging,Cppcheck,我用以下命令用cppcheck检查了我的程序 cppcheck --enable=all --inconclusive --xml-version=2 --output-file=getopt.c.txt -v getopt.c 它给了我一些配置缺口错误。我在网上搜索过,但不知道这是什么意思。下面是一些错误 <error id="ConfigurationNotChecked" severity="information" msg=&quo
cppcheck --enable=all --inconclusive --xml-version=2 --output-file=getopt.c.txt -v getopt.c
它给了我一些配置缺口错误。我在网上搜索过,但不知道这是什么意思。下面是一些错误
<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>
上面写着用-D来检查它。我如何在上面写的命令中使用它。我想知道这个错误是什么。我的cppcheck命令也会给出它能找到的所有可能的错误,或者我缺少一些参数。手册页对此进行了描述
-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
-D
默认情况下,Cppcheck检查所有配置。使用-D限制检查。当使用-D时,检查仅限于给定的配置。示例:-DDEBUG=1
-D__cplusplus
手册页对此进行了描述
-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
-D
默认情况下,Cppcheck检查所有配置。使用-D限制检查。当使用-D时,检查仅限于给定的配置。示例:-DDEBUG=1
-D__cplusplus
我是一名Cppcheck开发人员。这很奇怪。这听起来像是一个Cppcheck错误
在这种情况下,不应使用-D
理想情况下,我希望您创建一个简短的代码示例来重现问题。也许您可以在getopt.c的第190行提取一些代码,看看您是否仍然收到这样的信息。我是一名Cppcheck开发人员。这很奇怪。这听起来像是一个Cppcheck错误 在这种情况下,不应使用
-D
理想情况下,我希望您创建一个简短的代码示例来重现问题。也许您可以在getopt.c中的第190行提取一些代码,看看您是否仍然收到这样的信息消息