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.mcnamara@collabora.com> Tested-by: Jenkins
This commit is contained in:
parent
75235a0759
commit
a1d7dd96ea
2 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue