snaphat Posted June 28, 2006 Posted June 28, 2006 Does anyone know how to Disable Compiler Warnings for Standard Includes in VS 2005?I'm using Visual Studio 2005 & I have an extra include directory that I'm using via the project options. And to say the least- Visual Studio doesn't like it to much when I have Level 4 warnings on. It also gives warnings with level 3. And let me be clear- I do not want to do #pragma's to disable for specific warnings or to ignore specific warnings via the options. I want standard include files- such as #include <somefile.h> to not give warnings when I compile. Because, I'm not in a position to change those files or care about the warnings.
LLXX Posted June 29, 2006 Posted June 29, 2006 Because, I'm not in a position to change those files or care about the warnings.Then you should just ignore the warnings.
snaphat Posted June 29, 2006 Author Posted June 29, 2006 Because, I'm not in a position to change those files or care about the warnings.Then you should just ignore the warnings.There are 450+ warnings. It's tedious to look through a list that huge everytime I need to find legitiment warnings from my own code. Looking through a list that huge takes forever.
snaphat Posted June 29, 2006 Author Posted June 29, 2006 Figured it out: #pragma warning( disable: 4127).... some header files....#pragma warning( default: 4127)Will disable warnings for the includes it's around Whatever the particular warning you want to disable is.or you can try the following to get VS to shutup about particular things in your own code://check because gcc doesn't like #pragma warning()#if _MSC_VER#pragma warning( disable: 4127)#endifwhile(1){ #if _MSC_VER #pragma warning( default: 4127) #endif
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now