What happens if you don't include the tmh files in the analysis? For instance, delete sample.tmh before running cppcheck.
Then if you want you could add a windows_wpp.cfg that provides configuration for DoTraceLevelMessage() etc. I would be happy to add such cfg file in our repo.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
We use WPP in our codebase
https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/adding-wpp-macros-to-a-trace-provider
It is cheap way to add tracing info into your code.
Basically code look like this
sample.tmh is generated before compilation based on content of cpp and it is in include path.
After running cppcheck on such code I receive error:
error:cppcheckError: Analysis failed. If the code is valid then please report this failure.
So I preprocessed code with c preprocessor and I got this code:
First of all it seems MSVC has hidden intrinsic function
Is there a way add it to windows.cfg
Any idea how to handle code like this?
Thank you
Palo
Last edit: pmisik 2017-10-31
I am not good at WPP.
What happens if you don't include the tmh files in the analysis? For instance, delete sample.tmh before running cppcheck.
Then if you want you could add a windows_wpp.cfg that provides configuration for DoTraceLevelMessage() etc. I would be happy to add such cfg file in our repo.