[Libreoffice-commits] core.git: basic/source sot/source svl/source tools/source
Michael Stahl
mstahl at redhat.com
Sun Mar 30 14:13:59 PDT 2014
basic/source/runtime/iosys.cxx | 2 +-
sot/source/sdstor/stgstrms.cxx | 2 +-
sot/source/sdstor/ucbstorage.cxx | 2 +-
svl/source/misc/strmadpt.cxx | 4 ++--
tools/source/stream/stream.cxx | 6 +++---
tools/source/stream/strmwnt.cxx | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 4e3cf9cd8eb4602883339e5c9b9d4edcf05929d0
Author: Michael Stahl <mstahl at redhat.com>
Date: Sun Mar 30 23:08:54 2014 +0200
MSVC helpfully provides warning C4310: cast truncates constant value
Change-Id: I985216d7bade6cbb3a037b07fe44438543d63ba0
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 43942b8..be07963 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -375,7 +375,7 @@ sal_uInt64 OslStream::SeekPos( sal_uInt64 nPos )
{
::osl::FileBase::RC rc = ::osl::FileBase::E_None;
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nPos != SAL_MAX_UINT32);
if( nPos == STREAM_SEEK_TO_END )
{
rc = maFile.setPos( osl_Pos_End, 0 );
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 214b32e..62118b8 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -1284,7 +1284,7 @@ sal_uLong StgTmpStrm::PutData( const void* pData, sal_uLong n )
sal_uInt64 StgTmpStrm::SeekPos(sal_uInt64 n)
{
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(n != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(n != SAL_MAX_UINT32);
if( n == STREAM_SEEK_TO_END )
n = GetSize();
if( n && n > THRESHOLD && !pStrm )
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index deb5303..b26a355 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -942,7 +942,7 @@ sal_uLong UCBStorageStream_Impl::PutData( const void* pData, sal_uLong nSize )
sal_uInt64 UCBStorageStream_Impl::SeekPos(sal_uInt64 const nPos)
{
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nPos != SAL_MAX_UINT32);
if( !Init() )
return 0;
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index bc7eaac..8023efb 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -449,7 +449,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
return 0;
}
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(m_nSeekedFrom != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(m_nSeekedFrom != SAL_MAX_UINT32);
sal_uInt32 nRead = 0;
if (m_xSeekable.is())
{
@@ -551,7 +551,7 @@ void SvInputStream::FlushData()
sal_uInt64 SvInputStream::SeekPos(sal_uInt64 const nPos)
{
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nPos != SAL_MAX_UINT32);
if (open())
{
if (nPos == STREAM_SEEK_TO_END)
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index a8ce39c..7a41595 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -309,7 +309,7 @@ ErrCode SvAsyncLockBytes::FillAppend(const void * pBuffer, sal_Size nCount,
sal_uInt64 SvAsyncLockBytes::Seek(sal_uInt64 const nPos)
{
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nPos != SAL_MAX_UINT32);
if (nPos != STREAM_SEEK_TO_END)
m_nSize = nPos;
return m_nSize;
@@ -346,7 +346,7 @@ sal_Size SvStream::PutData( const void* pData, sal_Size nSize )
sal_uInt64 SvStream::SeekPos(sal_uInt64 const nPos)
{
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nPos != SAL_MAX_UINT32);
if( !GetError() && nPos == STREAM_SEEK_TO_END )
{
DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
@@ -1843,7 +1843,7 @@ sal_uInt64 SvMemoryStream::SeekPos(sal_uInt64 const nNewPos)
// nSize: Size of allocated buffer
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nNewPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nNewPos != SAL_MAX_UINT32);
if( nNewPos < nEndOfData )
nPos = nNewPos;
else if( nNewPos == STREAM_SEEK_TO_END )
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index ad4f133..8989921 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -163,7 +163,7 @@ sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos)
{
// check if a truncated STREAM_SEEK_TO_END was passed
- assert(nPos != (sal_uInt64)(sal_uInt32)STREAM_SEEK_TO_END);
+ assert(nPos != SAL_MAX_UINT32);
DWORD nNewPos = 0;
if( IsOpen() )
{
More information about the Libreoffice-commits
mailing list