From cd0bd260c9e80d0ff5a5efcbcc47943bda3c0a0f Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 30 Jul 2024 16:23:52 -0400 Subject: [PATCH] Fix GCC warnings --- include/boost/math/special_functions/powm1.hpp | 6 ++---- test/test_erf.cpp | 4 ++-- test/test_mapairy.cpp | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/boost/math/special_functions/powm1.hpp b/include/boost/math/special_functions/powm1.hpp index f00af2264..80d02dc29 100644 --- a/include/boost/math/special_functions/powm1.hpp +++ b/include/boost/math/special_functions/powm1.hpp @@ -64,10 +64,8 @@ BOOST_MATH_GPU_ENABLED inline T powm1_imp_dispatch(const T x, const T y, const P if (boost::math::trunc(y / 2) == y / 2) return powm1_imp(T(-x), T(y), pol); } - else - { - return powm1_imp(T(x), T(y), pol); - } + + return powm1_imp(T(x), T(y), pol); } } // detail diff --git a/test/test_erf.cpp b/test/test_erf.cpp index b4513d96d..d01f8024d 100644 --- a/test/test_erf.cpp +++ b/test/test_erf.cpp @@ -12,8 +12,8 @@ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wliteral-range" #elif defined(__GNUC__) -# pragma gcc diagnostic push -# pragma gcc diagnostic ignored "-Wliteral-range" +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" #endif #include diff --git a/test/test_mapairy.cpp b/test/test_mapairy.cpp index 096abde8b..ee8e43bf0 100644 --- a/test/test_mapairy.cpp +++ b/test/test_mapairy.cpp @@ -8,8 +8,8 @@ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wliteral-range" #elif defined(__GNUC__) -# pragma gcc diagnostic push -# pragma gcc diagnostic ignored "-Wliteral-range" +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" #endif #define BOOST_TEST_MAIN