From 2d50984185c7902d37783a98f19637c86694a452 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 26 Oct 2018 01:18:54 +0100 Subject: Fix a bunch of harmless compiler warnings on recent GCC releases. --- src/modules/extra/m_geoip.cpp | 6 +++++- src/modules/extra/m_ssl_gnutls.cpp | 4 +++- src/modules/m_httpd.cpp | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index 6272a5c24..e4299a1c2 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -34,7 +34,11 @@ #if defined __clang__ # pragma clang diagnostic ignored "-Wc++11-extensions" #elif defined __GNUC__ -# pragma GCC diagnostic ignored "-pedantic" +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) +# pragma GCC diagnostic ignored "-Wpedantic" +# else +# pragma GCC diagnostic ignored "-pedantic" +# endif #endif #include diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 8bd73b2bb..f5711cbd7 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -41,7 +41,9 @@ #if defined __clang__ # pragma clang diagnostic ignored "-Wc++11-extensions" #elif defined __GNUC__ -# if __GNUC__ < 6 +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) +# pragma GCC diagnostic ignored "-Wpedantic" +# else # pragma GCC diagnostic ignored "-pedantic" # endif #endif diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index f67f4cb81..3a0d4f861 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -32,7 +32,11 @@ #if defined __clang__ # pragma clang diagnostic ignored "-Wc++11-extensions" #elif defined __GNUC__ -# pragma GCC diagnostic ignored "-pedantic" +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) +# pragma GCC diagnostic ignored "-Wpedantic" +# else +# pragma GCC diagnostic ignored "-pedantic" +# endif #endif // Fix warnings about shadowing in http_parser. -- cgit v1.2.3