From 99176a1d10b463b647541b62a56ae9aed06255b9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 27 Nov 2015 20:05:48 -0500 Subject: [PATCH] Disabled compiler warnings for system headers on MSVC. Removed /Wp64; it's a no-op on VS2013 (our minimum supported version). --- GNUmakefile.msvc | 2 +- windows/winapi.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/GNUmakefile.msvc b/GNUmakefile.msvc index 17026991..b92ecdb0 100644 --- a/GNUmakefile.msvc +++ b/GNUmakefile.msvc @@ -80,7 +80,7 @@ OFILES := $(OFILES:%=$(OBJDIR)/%.o) # TODO loads of warnings in the system header files CFLAGS += \ /Zi \ - /W4 /Wp64 \ + /W4 \ /wd4100 \ /TC \ /analyze /bigobj /nologo \ diff --git a/windows/winapi.h b/windows/winapi.h index e6be40b1..487aa158 100644 --- a/windows/winapi.h +++ b/windows/winapi.h @@ -16,6 +16,10 @@ #define _WIN32_WINDOWS 0x0600 /* according to Microsoft's pdh.h */ #define _WIN32_IE 0x0700 /* according to Microsoft's sdkddkver.h */ #define NTDDI_VERSION 0x06000000 /* according to Microsoft's sdkddkver.h */ +// TODO cl.exe spews garbage warnings for system headers; figure out which flags cause it +#ifdef _MSC_VER +#pragma warning(push, 0) +#endif #include // Microsoft's resource compiler will segfault if we feed it headers it was not designed to handle #ifndef RC_INVOKED @@ -35,3 +39,6 @@ #include #include #endif +#ifdef _MSC_VER +#pragma warning(pop) +#endif