From cf311e57806681eeb924248f7de80ebd7fcd7c69 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 11 May 2022 16:09:39 +0200 Subject: [PATCH] Disable maybe-unitialized warning for boost headers using a pragma. --- libsolutil/Numeric.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libsolutil/Numeric.h b/libsolutil/Numeric.h index 557f7e2bc..384589764 100644 --- a/libsolutil/Numeric.h +++ b/libsolutil/Numeric.h @@ -29,7 +29,15 @@ #error "Unsupported Boost version. At least 1.65 required." #endif +// TODO: do this only conditionally as soon as a boost version with gcc 12 support is released. +#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif #include +#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12) +#pragma GCC diagnostic pop +#endif #include