[Libreoffice-commits] core.git: store/source
Tor Lillqvist
tml at collabora.com
Mon Jul 7 14:19:47 PDT 2014
store/source/lockbyte.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit bc1a0a8382fad035d87e530ca87f8a52b4a807bb
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Jul 8 00:16:14 2014 +0300
WaE: C4754
VS 2013 warns: Conversion rules for arithmetic operations in the
comparison mean that one branch cannot be executed.
Change-Id: I85f6df16b0ced94677568441d87a588bed1bfb9b
diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index 59bd50f..fff1999 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -90,7 +90,7 @@ storeError ILockBytes::readAt (sal_uInt32 nOffset, void * pBuffer, sal_uInt32 nB
if (nOffset == STORE_PAGE_NULL)
return store_E_CantSeek;
- sal_uInt64 const src_size = nOffset + nBytes;
+ sal_uInt64 const src_size = static_cast<sal_uInt64>(nOffset) + nBytes;
if (src_size > SAL_MAX_UINT32)
return store_E_CantSeek;
@@ -112,7 +112,7 @@ storeError ILockBytes::writeAt (sal_uInt32 nOffset, void const * pBuffer, sal_uI
if (nOffset == STORE_PAGE_NULL)
return store_E_CantSeek;
- sal_uInt64 const dst_size = nOffset + nBytes;
+ sal_uInt64 const dst_size = static_cast<sal_uInt64>(nOffset) + nBytes;
if (dst_size > SAL_MAX_UINT32)
return store_E_CantSeek;
More information about the Libreoffice-commits
mailing list