diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index bbfb85dd7ae4..671d5e1e2e6c 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -2824,6 +2824,10 @@ bool SwWrtShell::HasFoldedOutlineContentSelected() const void SwWrtShell::InfoReadOnlyDialog(bool bAsync) const { +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif if (bAsync) { auto xInfo = std::make_shared( @@ -2851,6 +2855,9 @@ void SwWrtShell::InfoReadOnlyDialog(bool bAsync) const } xInfo->run(); } +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16 +#pragma GCC diagnostic pop +#endif } bool SwWrtShell::WarnHiddenSectionDialog() const