Also online demo complains: [test.cpp:7]: (style) Condition 'pszErrorMessage' is always false
However the pszErrorMessage variable is allocated by FormatMessageA() call.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
have routine:
cppcheck 2.16 says:
Also online demo complains:
[test.cpp:7]: (style) Condition 'pszErrorMessage' is always false
However the pszErrorMessage variable is allocated by FormatMessageA() call.
You should pass
--library=windows
, since windows.cfg has configuration forFormatMessageA
.Yes, it works now:-) Thank you for help.:-)