diff options
author | linuxdaemon <linuxdaemon@users.noreply.github.com> | 2019-06-24 06:00:39 -0500 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-06-24 12:00:39 +0100 |
commit | 871d93dc76091a273296e9a0a7ce3d411054c862 (patch) | |
tree | 5eb690505ac81c283b14f6028cf81f76a2b0d51f /src/modules | |
parent | 04e3f329d3c1f325a74fe23e39daaf663166913b (diff) |
Reset diagnostic pragmas after including external headers (#1661).
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_ldap.cpp | 5 | ||||
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 7 | ||||
-rw-r--r-- | src/modules/extra/m_regex_re2.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_sha256.cpp | 7 |
8 files changed, 60 insertions, 1 deletions
diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index 65b6b2b00..0eb2f7511 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -28,11 +28,16 @@ // Ignore OpenLDAP deprecation warnings on OS X Yosemite and newer. #if defined __APPLE__ +# pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif #include <ldap.h> +#ifdef __APPLE__ +# pragma GCC diagnostic pop +#endif + #ifdef _WIN32 # pragma comment(lib, "libldap_r.lib") # pragma comment(lib, "liblber.lib") diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index d0ccebc47..02d2a08a9 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -28,6 +28,9 @@ /// $PackageInfo: require_system("debian") libmysqlclient-dev /// $PackageInfo: require_system("ubuntu") libmysqlclient-dev +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif // Fix warnings about the use of `long long` on C++03. #if defined __clang__ @@ -40,6 +43,10 @@ #include <mysql.h> #include "modules/sql.h" +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #ifdef _WIN32 # pragma comment(lib, "libmysql.lib") #endif diff --git a/src/modules/extra/m_regex_re2.cpp b/src/modules/extra/m_regex_re2.cpp index 4bcf287ca..e5b27fcd5 100644 --- a/src/modules/extra/m_regex_re2.cpp +++ b/src/modules/extra/m_regex_re2.cpp @@ -28,6 +28,10 @@ #include "inspircd.h" #include "modules/regex.h" +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif + // Fix warnings about the use of `long long` on C++03 and // shadowing on GCC. #if defined __clang__ @@ -39,6 +43,10 @@ #include <re2/re2.h> +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + class RE2Regex : public Regex { RE2 regexcl; diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 7807a69f0..47c5b01a4 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -30,6 +30,10 @@ #include "inspircd.h" #include "modules/sql.h" +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif + // Fix warnings about the use of `long long` on C++03. #if defined __clang__ # pragma clang diagnostic ignored "-Wc++11-long-long" @@ -39,6 +43,10 @@ #include <sqlite3.h> +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #ifdef _WIN32 # pragma comment(lib, "sqlite3.lib") #endif diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index ce1dbaeaf..5785b1ab4 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -37,6 +37,10 @@ #include "modules/ssl.h" #include <memory> +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif + // Fix warnings about the use of commas at end of enumerator lists on C++03. #if defined __clang__ # pragma clang diagnostic ignored "-Wc++11-extensions" @@ -54,6 +58,10 @@ #include <gnutls/gnutls.h> #include <gnutls/x509.h> +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #ifndef GNUTLS_VERSION_NUMBER #define GNUTLS_VERSION_NUMBER LIBGNUTLS_VERSION_NUMBER #define GNUTLS_VERSION LIBGNUTLS_VERSION diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 4937e7cb0..8d6b1e98c 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -34,6 +34,10 @@ #include "iohook.h" #include "modules/ssl.h" +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif + // Ignore OpenSSL deprecation warnings on OS X Lion and newer. #if defined __APPLE__ # pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -50,6 +54,10 @@ #include <openssl/err.h> #include <openssl/dh.h> +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #ifdef _WIN32 # pragma comment(lib, "ssleay32.lib") # pragma comment(lib, "libeay32.lib") diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index c4b5dc1f2..b768789f1 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -28,6 +28,10 @@ #include "iohook.h" #include "modules/httpd.h" +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif + // Fix warnings about the use of commas at end of enumerator lists and long long // on C++03. #if defined __clang__ @@ -44,11 +48,15 @@ // Fix warnings about shadowing in http_parser. #ifdef __GNUC__ -//# pragma GCC diagnostic ignored "-Wshadow" +# pragma GCC diagnostic ignored "-Wshadow" #endif #include <http_parser.c> +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + class ModuleHttpServer; static ModuleHttpServer* HttpModule; diff --git a/src/modules/m_sha256.cpp b/src/modules/m_sha256.cpp index e3ca22a2b..7afb9b3cf 100644 --- a/src/modules/m_sha256.cpp +++ b/src/modules/m_sha256.cpp @@ -22,6 +22,9 @@ /// $CompilerFlags: -Ivendor_directory("sha2") /// $CompilerFlags: require_compiler("GCC") -Wno-long-long +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif // Fix warnings about the use of `long long` on C++03. #if defined __clang__ @@ -35,6 +38,10 @@ #include <sha2.c> +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + class HashSHA256 : public HashProvider { public: |