I am compiling with cl.exe version _MSC_FULL_VER == 160030319 with warning level at 4. I get this warning:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(773) : warning C4514: 'std::_Mutex::_Mutex' : unreferenced inline function has been removed
Which is this bit of source code:
__thiscall _Mutex(_Uninitialized)
{ // do nothing
}
yvals.h is included in stdint.h which I am including like so:
#pragma warning(disable:4514)
#include <stdint.h>
#pragma warning(default:4514)
But it still does not get rid of the warning. Am I doing something wrong here?
I found the answer here. Someone reported it as a bug, but it was closed as by design. The answer is that the warning doesn’t kick in until the end of the translation unit. Quote:
So you either need to keep it always disabled or not worry about it.