Skip to content

Instantly share code, notes, and snippets.

@ennorehling
Created May 15, 2012 20:03
Show Gist options
  • Save ennorehling/2704685 to your computer and use it in GitHub Desktop.
Save ennorehling/2704685 to your computer and use it in GitHub Desktop.
/*
I think I finally found a good use for precompiled headers.
If you want to compile in visual studio with maximum warning levels on, and your problem
is that the windows headers are shit, you can put them in the precompiled headers surrounded
by pragma warning disable magic
The difference between just including windows.h and EnableAllWarnings (/Wall) and doing
the following is 82 lines of warnings:
*/
#pragma warning(push)
#pragma warning(disable: 4820)
#pragma warning(disable: 4668)
#pragma warning(disable: 4255)
#include <windows.h>
#pragma warning(pop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment