sw/source/core/edit/edsect.cxx                      |    2 +-
 sw/source/core/text/txtftn.cxx                      |    2 +-
 xmlsecurity/source/framework/saxeventkeeperimpl.cxx |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 880e093555386e866ef85949ab42cc8f9422994f
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed May 8 21:25:42 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu May 9 09:30:32 2024 +0200

    WaE: C6011 Dereferencing NULL pointer warnings
    
    Change-Id: I6ef2f39cca9e657a05b9b55d8ff87607261dd1ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167369
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index 816008776e51..77fd2e7b3dc9 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -301,7 +301,7 @@ static const SwNode* lcl_SpecialInsertNode(const 
SwPosition* pCurrentPos)
     const SwNode* pReturn = nullptr;
 
     // the current position
-    OSL_ENSURE( pCurrentPos != nullptr, "Strange, we have no position!" );
+    assert(pCurrentPos && "Strange, we have no position!");
     const SwNode& rCurrentNode = pCurrentPos->GetNode();
 
     // find innermost section or table.  At the end of this scope,
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 145a3a30d00f..35bb31f76a4c 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1034,7 +1034,7 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( 
SwTextFormatInfo const
 
 static OUString lcl_GetPageNumber( const SwPageFrame* pPage )
 {
-    OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrame" );
+    assert(pPage && "GetPageNumber: Homeless TextFrame");
     const sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
     const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
     return rNum.GetNumStr( nVirtNum );
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx 
b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index b5a7f027287f..fe6c0ed915d9 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -648,6 +648,7 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer()
                         BufferNode* pTempCurrentBlockingBufferNode = 
m_pCurrentBlockingBufferNode;
 
                         m_pCurrentBufferNode = pBufferNode;
+                        assert(pBufferNode);
                         m_pCurrentBlockingBufferNode = nullptr;
 
                         m_bIsForwarding = true;

Reply via email to