inspircd

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

commit 871d93dc76091a273296e9a0a7ce3d411054c862
parent 04e3f329d3c1f325a74fe23e39daaf663166913b
Author: linuxdaemon <linuxdaemon@users.noreply.github.com>
Date:   Mon, 24 Jun 2019 06:00:39 -0500

Reset diagnostic pragmas after including external headers (#1661).


Diffstat:
Msrc/modules/extra/m_ldap.cpp | 5+++++
Msrc/modules/extra/m_mysql.cpp | 7+++++++
Msrc/modules/extra/m_regex_re2.cpp | 8++++++++
Msrc/modules/extra/m_sqlite3.cpp | 8++++++++
Msrc/modules/extra/m_ssl_gnutls.cpp | 8++++++++
Msrc/modules/extra/m_ssl_openssl.cpp | 8++++++++
Msrc/modules/m_httpd.cpp | 10+++++++++-
Msrc/modules/m_sha256.cpp | 7+++++++
8 files changed, 60 insertions(+), 1 deletion(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: