aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-10-10 19:29:56 +0100
committerGravatar Sadie Powell2024-10-10 19:29:56 +0100
commit896ed2b512a1c3723eae032dfb71cd6d594cb218 (patch)
treed0bf698079945c0142bfbfda3665bd95d575fc66 /src/modules
parentWhen a server stops being ulined remove its users from the uline list. (diff)
Fix a pgsql module warning when building against recent libpq.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_pgsql.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 1bf17313b..70846d90e 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -37,11 +37,30 @@
/// $PackageInfo: require_system("ubuntu") libpq-dev
+#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"
+#elif defined __GNUC__
+# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8))
+# pragma GCC diagnostic ignored "-Wpedantic"
+# else
+# pragma GCC diagnostic ignored "-pedantic"
+# endif
+#endif
+
#include "inspircd.h"
#include <cstdlib>
#include <libpq-fe.h>
#include "modules/sql.h"
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
/* SQLConn rewritten by peavey to
* use EventHandler instead of
* BufferedSocket. This is much neater