I'm running cppcheck on windows, but I'm analyzing an ARM codebase and have no libraries checked in the project configuration.
Adding ERROR to the undefines list does appear to fix the issue, though it's not clear to me why I was picking up a #define from outside my selected libraries, include dirs, and source dirs. Is there a misconfiguration on my end?
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm attempting to run cppcheck 2.5 on a project that includes some vendor code, and I've found the the following enum causes a syntax error:
I confirmed by making a .cpp file (attached) containing only that enum and analyzing it independent of any other code:
Are you on Windows? There is a #define ERROR in wingdi.h, which is also part of cppcheck's windows.cfg. Maybe passing
-UERROR
would help?I'm running cppcheck on windows, but I'm analyzing an ARM codebase and have no libraries checked in the project configuration.
Adding ERROR to the undefines list does appear to fix the issue, though it's not clear to me why I was picking up a #define from outside my selected libraries, include dirs, and source dirs. Is there a misconfiguration on my end?
Thank you!
The default platform is the one you're running on. You can specify a different one using
--platform
https://linux.die.net/man/1/cppcheck