sw/source/core/layout/flowfrm.cxx |    8 ++++++++
 sw/source/core/text/txtftn.cxx    |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 07c61babca24ef83f94172225f597f39c5f6c462
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Jun 1 15:48:30 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Jun 2 16:07:06 2023 +0200

    WaE: -Wmaybe-uninitialized with GCC 13
    
    Change-Id: I69e0f28ab6f6a8a2c7181876735b128d39394b52
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152503
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 9ff2b61876843584d6c4fb3cadda48089b8a84b7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152530

diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index c3690e2984cc..b499257bb001 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -2000,7 +2000,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<SwFrameDeleteGuard> oDeleteGuard;
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
+#pragma GCC diagnostic pop
+#endif
     if (bMakePage)
         oDeleteGuard.emplace(pOldBoss);
 
commit 27800d75517957f3c372e281efd4b4c04f8b6751
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Jun 1 20:49:22 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Jun 2 16:06:53 2023 +0200

    Related: tdf#122081 null-deref of SwFootnoteFrame
    
    load doc, ctrl+end, ctrl+home, ctrl+6 enter 29, return, wheel scroll
    down 7 or 8 times and this null-deref
    
    Change-Id: I1963a89e3223de89f3414e435accd8d8ebfe80a9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152511
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 389a8d52d9961f89c0b2847b30ee1ca59a8fdc80)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152448
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index c86c1bc4ab0d..035158e2bd25 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -664,7 +664,7 @@ void SwTextFrame::ConnectFootnote( SwTextFootnote 
*pFootnote, const SwTwips nDea
             mbInFootnoteConnect = false;
             return;
         }
-        else if( pSrcFrame )
+        else if (pSrcFrame && pFootnoteFrame)
         {
             SwFootnoteBossFrame *pFootnoteBoss = 
pFootnoteFrame->FindFootnoteBossFrame();
             if( !pFootnoteBoss->IsInSct() ||

Reply via email to