summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
5 files changed, 16 insertions, 5 deletions
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.