From 6a074fd29486383e285fa2811d46d8d7b793c882 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 27 Sep 2015 09:33:56 +0200 Subject: [PATCH] only disable MSVC2015 warnings in MSVC2015, do not break confuse compilers. --- src/platform.h | 2 ++ src/report.c | 2 +- src/reports.c | 2 +- src/spells.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/platform.h b/src/platform.h index 8e207fae2..77a767875 100644 --- a/src/platform.h +++ b/src/platform.h @@ -34,6 +34,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # undef MOUSE_MOVED # define STDIO_CP 1252 /* log.c, convert to console character set */ # pragma warning (disable: 4201 4214 4514 4115 4711) +#if _MSC_VER >= 1900 # pragma warning(disable: 4710) /* warning C4710: function not inlined */ # pragma warning(disable: 4456) @@ -42,6 +43,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* warning C4457: declaration of hides function parameter */ # pragma warning(disable: 4459) /* warning C4459: declaration of hides global declaration */ +#endif # pragma warning(disable: 4056) /* warning C4056: overflow in floating point constant arithmetic */ # pragma warning(disable: 4201) diff --git a/src/report.c b/src/report.c index 254da710e..aa9b9addd 100644 --- a/src/report.c +++ b/src/report.c @@ -96,7 +96,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER >= 1900 # pragma warning(disable: 4774) // TODO: remove this #endif diff --git a/src/reports.c b/src/reports.c index 5f547b6ed..bf365ab6c 100644 --- a/src/reports.c +++ b/src/reports.c @@ -73,7 +73,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "move.h" -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER >= 1900 # pragma warning(disable: 4774) // TODO: remove this #endif diff --git a/src/spells.c b/src/spells.c index 033d74024..61c86956d 100644 --- a/src/spells.c +++ b/src/spells.c @@ -101,7 +101,7 @@ #include /* ----------------------------------------------------------------------- */ -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER >= 1900 # pragma warning(disable: 4774) // TODO: remove this #endif