From ff41a13441d9ec96329b5d551b07f2a68c1674b8 Mon Sep 17 00:00:00 2001 From: Oldes Date: Wed, 1 Nov 2017 20:29:07 +0100 Subject: [PATCH] FIX: locally disabling warning C4146: unary minus operator applied to unsigned type, result still unsigned, as it blocks compilation in Visual Studio --- src/core/n-math.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/n-math.c b/src/core/n-math.c index 80a2afc9ef..89c8b8def8 100644 --- a/src/core/n-math.c +++ b/src/core/n-math.c @@ -242,6 +242,10 @@ enum {SINE, COSINE, TANGENT}; return R_RET; } +#if defined(_MSC_VER) && _MSC_VER > 1800 +#pragma warning (disable : 4146) +#endif + /*********************************************************************** ** @@ -284,6 +288,12 @@ enum {SINE, COSINE, TANGENT}; return R_ARG1; } +// See above for the temporary disablement and reasoning. +// +#if defined(_MSC_VER) && _MSC_VER > 1800 +#pragma warning (default : 4146) +#endif + /*********************************************************************** **