summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-01-19 19:57:37 +0100
committerMax Kellermann <max@musicpd.org>2021-01-19 19:58:04 +0100
commita14ce4c7cbd15aecbf8291eab8fb396c81577b78 (patch)
treec8b23889443de0a0b25a2b72d952d609363efaba /src/lib
parent85a5b7dec4f692667500967989491615a58b8c8a (diff)
lib/pcre/RegexPointer: work around bogus -Wmaybe-uninitialized with GCC 11
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/pcre/RegexPointer.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/pcre/RegexPointer.hxx b/src/lib/pcre/RegexPointer.hxx
index 7311d0407..cb7e730ba 100644
--- a/src/lib/pcre/RegexPointer.hxx
+++ b/src/lib/pcre/RegexPointer.hxx
@@ -40,6 +40,13 @@
#include <array>
+#if GCC_CHECK_VERSION(11,0)
+#pragma GCC diagnostic push
+/* bogus GCC 11 warning "ovector may be used uninitialized" in the
+ ovector.size() call */
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
class RegexPointer {
protected:
pcre *re = nullptr;
@@ -63,4 +70,8 @@ public:
}
};
+#if GCC_CHECK_VERSION(11,0)
+#pragma GCC diagnostic pop
+#endif
+
#endif