I've recently moved a large codebase from VS2013 to VS2019 that builds for windows 32 and 64 bit targets.
Debug and release versions compile with numerous warnings, although these are largely the same as existed in the VS2013 build. Most of them are trivial issues that I know to be safe. I'm compiling with the "W3" compiler option.
However when I attempt to compile an "analyze" version of the build, (I include the "/analyze" compiler option) I get many of the following:
error C2220: the following warning is treated as an error
That's to be expected, and some of those errors needed attention. But the first thing that seems strange is that MANY of those "errors" were from the windows SDK libraries - code I'm not exactly prepared to edit.
Then I read the following: https://learn.microsoft.com/en-us/cpp/build/reference/analyze-code-analysis?view=vs-2019 So I amended "/analyze" to /analyze:WX-", just for the sake of experimenting. This silenced a LOT of the errors, but I still get a number of "Error C2220: the following warning is treated as an error", mostly in 3rd party libraries. I'm happy to fix (or ignore where appropriate) issues that have come up in my own code.
So my question is, how do I suppress this error when it is cropping up in things like the windows SDK and very well-used 3rd party libraries? That fact that this isn't more of an issue makes me suspect I've missed something here. But I currently can't get through a code analysis, which was really not problematic in VS2013.