cui/source/dialogs/MacroManagerDialog.cxx | 2 +- store/source/lockbyte.cxx | 6 +++++- store/source/storcach.cxx | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-)
New commits: commit a1d7dd96ea89427f8b8e8553b5bf46302432c645 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Dec 3 10:02:01 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Dec 4 11:39:50 2024 +0100 cid#1607257 Overflowed constant this shouldn't happen unless the rdb is broken Change-Id: I3e861d25a8c10243f03446ec8a7b44457186585a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177774 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx index a786488ad7f6..a907c0f8ddc3 100644 --- a/store/source/lockbyte.cxx +++ b/store/source/lockbyte.cxx @@ -36,7 +36,11 @@ using namespace store; storeError ILockBytes::initialize (rtl::Reference< PageData::Allocator > & rxAllocator, sal_uInt16 nPageSize) { - OSL_PRECOND((STORE_MINIMUM_PAGESIZE <= nPageSize) && (nPageSize <= STORE_MAXIMUM_PAGESIZE), "invalid PageSize"); + if (nPageSize < STORE_MINIMUM_PAGESIZE || nPageSize > STORE_MAXIMUM_PAGESIZE) + { + SAL_WARN("store", "invalid PageSize"); + return store_E_InvalidParameter; + } return initialize_Impl (rxAllocator, nPageSize); } diff --git a/store/source/storcach.cxx b/store/source/storcach.cxx index 82b5dcea9ef9..5907cfc730e7 100644 --- a/store/source/storcach.cxx +++ b/store/source/storcach.cxx @@ -127,8 +127,8 @@ static constexpr int highbit(std::size_t n) { int k = 1; - if (n == 0) - return 0; + assert(n > 0 && "can never be called with n == 0"); + if constexpr (sizeof(n) == 8) { if (n & 0xffffffff00000000) commit 75235a0759160fea2a15c2eaf9f7155f218b898a Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed Dec 4 08:52:03 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Dec 4 11:39:41 2024 +0100 cid#1636560 silence Unchecked return value Change-Id: Iffb4b464ff124ffce19548a756d878130c10921a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177772 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/cui/source/dialogs/MacroManagerDialog.cxx b/cui/source/dialogs/MacroManagerDialog.cxx index 021bcaf19751..0d070420fbb1 100644 --- a/cui/source/dialogs/MacroManagerDialog.cxx +++ b/cui/source/dialogs/MacroManagerDialog.cxx @@ -188,7 +188,7 @@ void ScriptContainersListBox::Remove(const weld::TreeIter* pEntryIter, bool bRem while (m_xTreeView->iter_compare(*xIter, *pEntryIter) != 0) { m_xTreeView->copy_iterator(*xIter, *xRemoveIter); - m_xTreeView->iter_previous(*xIter); + (void)m_xTreeView->iter_previous(*xIter); ScriptContainerInfo* pScriptContainerInfo = weld::fromId<ScriptContainerInfo*>(m_xTreeView->get_id(*xRemoveIter)); if (pScriptContainerInfo)