inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 232332e064312b30de81230fbb7805e38a57c8f1
parent d107093513680d67e4007b725499609a090c6ad3
Author: Peter Powell <petpow@saberuk.com>
Date:   Mon, 20 May 2019 12:00:44 +0100

Fix some warnings in m_httpd on older versions of GCC.

Diffstat:
Msrc/modules/m_httpd.cpp | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 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 <http_parser.c> class ModuleHttpServer; @@ -58,7 +57,8 @@ static http_parser_settings parser_settings; */ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intrusive_list_node<HttpServerSocket> { - friend ModuleHttpServer; + private: + friend class ModuleHttpServer; http_parser parser; http_parser_url url;