From 232332e064312b30de81230fbb7805e38a57c8f1 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 20 May 2019 12:00:44 +0100 Subject: Fix some warnings in m_httpd on older versions of GCC. --- src/modules/m_httpd.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index f9e5bc0fd..8c409cbcb 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -28,10 +28,14 @@ #include "iohook.h" #include "modules/httpd.h" -// Fix warnings about the use of commas at end of enumerator lists on C++03. +// Fix warnings about the use of commas at end of enumerator lists and long long +// on C++03 and warnings about shadowing in the http_parser library. #if defined __clang__ # pragma clang diagnostic ignored "-Wc++11-extensions" +# pragma clang diagnostic ignored "-Wc++11-long-long" #elif defined __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# pragma GCC diagnostic ignored "-Wshadow" # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) # pragma GCC diagnostic ignored "-Wpedantic" # else @@ -39,11 +43,6 @@ # endif #endif -// Fix warnings about shadowing in http_parser. -#ifdef __GNUC__ -# pragma GCC diagnostic ignored "-Wshadow" -#endif - #include class ModuleHttpServer; @@ -58,7 +57,8 @@ static http_parser_settings parser_settings; */ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intrusive_list_node { - friend ModuleHttpServer; + private: + friend class ModuleHttpServer; http_parser parser; http_parser_url url; -- cgit v1.2.3