From 9ff2b61876843584d6c4fb3cadda48089b8a84b7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 1 Jun 2023 15:48:30 +0100 Subject: WaE: -Wmaybe-uninitialized with GCC 13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I69e0f28ab6f6a8a2c7181876735b128d39394b52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152503 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sw/source/core/layout/flowfrm.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 402f47f8004e..cb47267f1195 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -2020,7 +2020,15 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) } } +// prevent -Werror=maybe-uninitialized under gcc 11.2.0 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif std::optional oDeleteGuard; +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13 +#pragma GCC diagnostic pop +#endif if (bMakePage) oDeleteGuard.emplace(pOldBoss); -- cgit