diff --git a/src/bindings/cpp/include/key.hpp b/src/bindings/cpp/include/key.hpp index 97334c77570..57f3518590f 100644 --- a/src/bindings/cpp/include/key.hpp +++ b/src/bindings/cpp/include/key.hpp @@ -11,7 +11,18 @@ #include #include + +#if __GNUC__ >= 12 +#pragma GCC diagnostic error "-Wmaybe-uninitialized" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#include +#pragma GCC diagnostic pop +#pragma GCC diagnostic pop +#else #include +#endif + #include #include #include diff --git a/src/tools/kdb/gen/highlevel/common.hpp b/src/tools/kdb/gen/highlevel/common.hpp index 3a631085e49..4d799415f23 100644 --- a/src/tools/kdb/gen/highlevel/common.hpp +++ b/src/tools/kdb/gen/highlevel/common.hpp @@ -11,7 +11,18 @@ #define ELEKTRA_KDB_GEN_HIGHLEVEL_COMMON_HPP #include + +#if __GNUC__ >= 12 +#pragma GCC diagnostic error "-Wmaybe-uninitialized" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#include +#pragma GCC diagnostic pop +#pragma GCC diagnostic pop +#else #include +#endif + std::string upCaseFirst (const std::string & str); diff --git a/src/tools/kdb/gen/mustache.hpp b/src/tools/kdb/gen/mustache.hpp index 3311516b1cc..7c1429b2b2e 100644 --- a/src/tools/kdb/gen/mustache.hpp +++ b/src/tools/kdb/gen/mustache.hpp @@ -34,7 +34,18 @@ #include #include + +#if __GNUC__ >= 12 +#pragma GCC diagnostic error "-Wmaybe-uninitialized" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#include +#pragma GCC diagnostic pop +#pragma GCC diagnostic pop +#else #include +#endif + #include #include #include