lib/pcre/RegexPointer: work around bogus -Wmaybe-uninitialized with GCC 11

This commit is contained in:
Max Kellermann 2021-01-19 19:57:37 +01:00
parent 85a5b7dec4
commit a14ce4c7cb

View File

@ -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