summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-05-20 12:00:44 +0100
committerPeter Powell <petpow@saberuk.com>2019-05-20 12:03:42 +0100
commit232332e064312b30de81230fbb7805e38a57c8f1 (patch)
tree85a2c880db184eef93e5259122d542bdfce0d0f1
parentd107093513680d67e4007b725499609a090c6ad3 (diff)
Fix some warnings in m_httpd on older versions of GCC.
-rw-r--r--src/modules/m_httpd.cpp14
1 files changed, 7 insertions, 7 deletions
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 <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;