summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make/template/main.mk2
-rw-r--r--src/command_parse.cpp2
-rw-r--r--src/configparser.cpp3
-rw-r--r--src/modules/extra/m_geoip.cpp6
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
-rw-r--r--src/modules/m_httpd.cpp6
6 files changed, 17 insertions, 6 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index a67c14f73..74b5b066c 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -55,7 +55,7 @@ INSTMODE_LIB = 0640
ifneq ($(COMPILER), ICC)
CORECXXFLAGS += -Woverloaded-virtual -Wshadow
ifneq ($(SYSTEM), openbsd)
- CORECXXFLAGS += -pedantic -Wformat=2 -Wmissing-format-attribute
+ CORECXXFLAGS += -pedantic -Wformat=2 -Wmissing-format-attribute -Wno-format-nonliteral
endif
endif
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index d4dd7da21..c2ae39d49 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -452,7 +452,7 @@ void CommandParser::TranslateSingleParam(TranslateType to, const std::string& it
}
// If no custom translator was given, fall through
}
- case TR_TEXT:
+ /*@fallthrough@*/
default:
/* Do nothing */
dest.append(item);
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 825053044..437b3cdb0 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -286,7 +286,8 @@ struct Parser
break;
case 0xFE:
case 0xFF:
- stack.errstr << "Do not save your files as UTF-16; use ASCII!\n";
+ stack.errstr << "Do not save your files as UTF-16 or UTF-32, use UTF-8!\n";
+ /*@fallthrough@*/
default:
throw CoreException("Syntax error - start of tag expected");
}
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 <GeoIP.h>
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.