I am running cppcheck on my codebase using a project file. For some files, it just prints out the preprocessor defines and on other files it prints nothing
If Cppcheck fails to process a file and bails out it will print errors. (syntaxError, internalError, unknownMacro, ...).
As far as I can tell, the file xxx.cpp was actually preprocessed and checked 2 times and yyy.cpp was preprocessed and checked once. We have "short-circuits" so we don't analyse the same code twice (compared after preprocessing).. but those do not affect what warnings you will see.
Last edit: Daniel Marjamäki 2020-03-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running cppcheck on my codebase using a project file. For some files, it just prints out the preprocessor defines and on other files it prints nothing
Checking …\xxx.cpp ...
Checking …\xxx.cpp: cplusplus;__GNUC;…..
20/284 files checked 5% done
Checking …\yyy.cpp ...
21/284 files checked 5% done
What does printing out the preprocessor defines for the file mean? Did it process the file and find some errors or was it unable to process the file?
Thanks
If Cppcheck fails to process a file and bails out it will print errors. (syntaxError, internalError, unknownMacro, ...).
As far as I can tell, the file xxx.cpp was actually preprocessed and checked 2 times and yyy.cpp was preprocessed and checked once. We have "short-circuits" so we don't analyse the same code twice (compared after preprocessing).. but those do not affect what warnings you will see.
Last edit: Daniel Marjamäki 2020-03-19