Hello cppcheck gurus!
Got the following problem (tried to get rid of missingIncludeSystem, but got another problems :) :
1. OS Windows 7 x86
2. cppcheck x86 1.73
output: (bunch of similar lines pointing to VC\INCLUDE\swprintf.inl and VC\INCLUDE\stdio.h)
<error id="va_list_usedBeforeStarted" severity="error" msg="va_list '_Arglist' used before va_start() was called." verbose="va_list '_Arglist' used before va_start() was called." cwe="664">
<location file0="src\\main.cxx" file="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\swprintf.inl" line="42"/>
</error>
<error id="va_list_usedBeforeStarted" severity="error" msg="va_list '_ArgList' used before va_start() was called." verbose="va_list '_ArgList' used before va_start() was called." cwe="664">
<location file0="src\\main.cxx" file="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\stdio.h" line="483"/>
</error>
question:
Is it possible to leave -I parameter in cppcheck arguments, but somehow either completely disable it's checking or disable cheking per file.
PS while playing around with parameters I found a bug in cppcheck x86 1.76.1
the following code (I figured out that I have to add ifdef/endif to reproduce cppcheck x86 1.73 behaviour) :
with the following commandline:
cppcheck.exe ./src -I"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE" --suppress=purgedConfiguration --report-progress --force --inline-suppr --enable=all --verbose --xml-version=2
results in the following output (see file="zzz\Program Files... instead of file="C:\Program Files... Where zzz - is a folder in which ./src resides)
<errorid="va_list_usedBeforeStarted"severity="error"msg="va_list '_Arglist' used before va_start() was called."verbose="va_list '_Arglist' used before va_start() was called."cwe="664"><locationfile0="src\main.cxx"file="zzz\Program Files\Microsoft Visual Studio 10.0\VC\include\swprintf.inl"line="66"/></error>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, got it working in 1.75 :
--suppress=:"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\swprintf.inl"
--suppress=:"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h"
partial path is also possible :
--suppress=*:"VC\INCLUDE\swprintf.inl"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello cppcheck gurus!
Got the following problem (tried to get rid of missingIncludeSystem, but got another problems :) :
1. OS Windows 7 x86
2. cppcheck x86 1.73
commandline:
cppcheck.exe ./src -I"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE" --suppress=purgedConfiguration --report-progress --force --inline-suppr --enable=all --verbose --xml-version=2
source file (src/main.cxx) :
//------------------------------------------
//------------------------------------------
output: (bunch of similar lines pointing to VC\INCLUDE\swprintf.inl and VC\INCLUDE\stdio.h)
<error id="va_list_usedBeforeStarted" severity="error" msg="va_list '_Arglist' used before va_start() was called." verbose="va_list '_Arglist' used before va_start() was called." cwe="664">
<location file0="src\\main.cxx" file="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\swprintf.inl" line="42"/>
</error>
<error id="va_list_usedBeforeStarted" severity="error" msg="va_list '_ArgList' used before va_start() was called." verbose="va_list '_ArgList' used before va_start() was called." cwe="664">
<location file0="src\\main.cxx" file="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\stdio.h" line="483"/>
</error>
question:
Is it possible to leave -I parameter in cppcheck arguments, but somehow either completely disable it's checking or disable cheking per file.
PS while playing around with parameters I found a bug in cppcheck x86 1.76.1
the following code (I figured out that I have to add ifdef/endif to reproduce cppcheck x86 1.73 behaviour) :
with the following commandline:
cppcheck.exe ./src -I"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE" --suppress=purgedConfiguration --report-progress --force --inline-suppr --enable=all --verbose --xml-version=2
results in the following output (see file="zzz\Program Files... instead of file="C:\Program Files... Where zzz - is a folder in which ./src resides)
Ok, got it working in 1.75 :
--suppress=:"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\swprintf.inl"
--suppress=:"C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h"
partial path is also possible :
--suppress=*:"VC\INCLUDE\swprintf.inl"
Oops, sorry ...
partial path doesn't work - only full path works