diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-30 09:26:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-21 22:33:50 +0200 |
commit | 08db0792562f23be138c56e347a6c3121ad1512c (patch) | |
tree | 09e32f04faa58e79f74d837a8a9f3a6422ed773c | |
parent | e2bf07ea2553acf204f94c90bb4f547b15b12861 (diff) |
cid#1607013 silence Overflowed return value
and
cid#1607569 Overflowed return value
Change-Id: Ie83b1e4c9942e5d74b23c5ef00032d0a8721d982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173742
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 5 | ||||
-rw-r--r-- | vcl/source/treelist/treelist.cxx | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index f6ef057d4ae5..c1b9d8f9d74a 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -778,11 +778,14 @@ SwRedlineTable::size_type SwRedlineTable::FindPrevSeqNo( sal_uInt16 nSeqNo, size ++nSttPos; while( nSttPos > nEnd ) - if( nSeqNo == operator[]( --nSttPos )->GetSeqNo() ) + { + --nSttPos; + if( nSeqNo == operator[](nSttPos)->GetSeqNo() ) { nRet = nSttPos; break; } + } } return nRet; } diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 3c9079cb68cb..50003c621fe7 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -431,6 +431,7 @@ sal_uInt32 SvTreeList::GetVisibleChildCount(const SvListView* pView, SvTreeListE pParent = NextVisible( pView, pParent, &nActDepth ); nCount++; } while( pParent && nRefDepth < nActDepth ); + assert(nCount >= 1 && "given do...while"); nCount--; return nCount; } |