Originally Posted by
JVene
Thus:
#pragma warning( disable: nnnn );
where nnnn is the warning number
For portable code, this should be wrapped in a conditional block for the ms compiler
This disables the warning from there onward, which will silence any such warnings in the following code. Thus you need to do something like this:
Code:
#ifdef _MSC_VER // Detect if it's Microsoft's compilers
#pragma warning(push)
#pragma warning(disable: nnnn)
#endif
// Code
#ifdef _MSC_VER
#pragma warning(pop)
#endif
Originally Posted by
whiteflags
"A lot of other problems"? Microsoft's warning doesn't even mention why x was deprecated in favor of x_s, so there is no silencing of any issues regardless, it's merely an authoritative tenet. The macro doesn't remove any other warning, either, according to their docs.
It's clearly outlined in the documentation why to use the *_s versions.
Warnings aren't always so informative.
The macro removes ALL warnings about deprecated functions.