diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-30 20:08:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-01 09:17:27 +0200 |
commit | fdbc8d1374e2a9fde6c99acbe6923a277695a0a3 (patch) | |
tree | 945aa7aa4638c47e76b5524e4c8f8d1e3e32b212 /sot/source | |
parent | fe72e20f865baca9387e5d14327c56b2773d760f (diff) |
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ie1aff54bbc2d9dad0298636bf680ac7790f70a72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sot/source')
-rw-r--r-- | sot/source/sdstor/stg.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgavl.cxx | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 2b3e9a146908..86658536cb07 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -440,7 +440,7 @@ void Storage::Init( bool bCreate ) bool bHdrLoaded = false; bIsRoot = true; - OSL_ENSURE( pIo, "The pointer may not be empty at this point!" ); + assert(pIo && "The pointer may not be empty at this point!"); if( pIo->Good() && pIo->GetStrm() ) { sal_uInt64 nSize = pIo->GetStrm()->TellEnd(); diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx index 98a86f3edb96..ac0c5f468024 100644 --- a/sot/source/sdstor/stgavl.cxx +++ b/sot/source/sdstor/stgavl.cxx @@ -59,7 +59,7 @@ sal_Int32 StgAvlNode::Locate sal_Int32 nRes = 0; StgAvlNode* pCur = this; - OSL_ENSURE( pPivot && pParent && pPrev, "The pointers may not be NULL!" ); + assert(pPivot && pParent && pPrev && "The pointers may not be NULL!"); *pParent = *pPrev = nullptr; *pPivot = this; @@ -94,10 +94,11 @@ short StgAvlNode::Adjust( StgAvlNode** pHeavy, StgAvlNode const * pNew ) StgAvlNode* pCur = this; short nDelta; // no traversing - OSL_ENSURE( pHeavy && pNew, "The pointers is not allowed to be NULL!" ); if( pCur == pNew || !pNew ) return m_nBalance; + assert(pHeavy && pNew && "The pointers is not allowed to be NULL!"); + sal_Int32 nRes = Compare( pNew ); if( nRes > 0 ) { |