From ac4b491b2039fd28395d8f92eecc58727799fd86 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 Nov 2017 21:51:33 -0800 Subject: [PATCH] Disabled spurious Visual Studio warnings in the uClibc math code --- src/libm/e_log.c | 5 +++++ src/libm/e_pow.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/libm/e_log.c b/src/libm/e_log.c index 66b6b36c177ca..208df815c3826 100644 --- a/src/libm/e_log.c +++ b/src/libm/e_log.c @@ -9,6 +9,11 @@ * ==================================================== */ +#if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */ +/* C4723: potential divide by zero. */ +#pragma warning ( disable : 4723 ) +#endif + /* __ieee754_log(x) * Return the logrithm of x * diff --git a/src/libm/e_pow.c b/src/libm/e_pow.c index a1cb26f407b56..cfd1dbfbeb939 100644 --- a/src/libm/e_pow.c +++ b/src/libm/e_pow.c @@ -58,6 +58,11 @@ #include "math_libm.h" #include "math_private.h" +#if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */ +/* C4756: overflow in constant arithmetic */ +#pragma warning ( disable : 4756 ) +#endif + static const double bp[] = {1.0, 1.5,}, dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */