From ca3939e682a3198a3d18f42b7fbf84823312dc61 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 3 Jun 2010 22:28:30 +0100 Subject: [PATCH] msvc: Disable a level 4 warning and change -W3 to -W4 Signed-off-by: Ramsay Jones --- Makefile | 2 +- src/cc-compat.h | 2 ++ tests/Makefile | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5018a35e0..ab5685026 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ ifeq ($(uname_S),Windows) RANLIB = echo CC = cl -nologo AR = lib -nologo - CFLAGS = -TC -W3 -RTC1 -Zi -DWIN32 -D_DEBUG -D_LIB + CFLAGS = -TC -W4 -RTC1 -Zi -DWIN32 -D_DEBUG -D_LIB AR_OUT=-out: CC_OUT=-Fo NO_VISIBILITY=YesPlease diff --git a/src/cc-compat.h b/src/cc-compat.h index 5071d5322..cf6cccf12 100644 --- a/src/cc-compat.h +++ b/src/cc-compat.h @@ -66,6 +66,8 @@ #if defined(_MSC_VER) /* disable "deprecated function" warnings */ # pragma warning ( disable : 4996 ) +/* disable "conditional expression is constant" level 4 warnings */ +# pragma warning ( disable : 4127 ) #endif #endif /* INCLUDE_compat_h__ */ diff --git a/tests/Makefile b/tests/Makefile index e3059f59c..2525ae8a3 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -28,7 +28,7 @@ CC_OUT=-o # add a space ifeq ($(uname_S),Windows) CC = cl -nologo LD = link -nologo - CFLAGS = -TC -W3 -RTC1 -Zi -DWIN32 -D_DEBUG -D_LIB + CFLAGS = -TC -W4 -RTC1 -Zi -DWIN32 -D_DEBUG -D_LIB LD_OUT=-out: CC_OUT=-Fo