coverity#1240260 Operands don't affect result
see can we silence these false positives coverity#1240259 Operands don't affect result coverity#1240254 Operands don't affect result coverity#1240264 Operands don't affect result coverity#1240267 Operands don't affect result Change-Id: Ieca40474c231e33a516b70f7693346ac73babd61
This commit is contained in:
@@ -1110,8 +1110,7 @@ SAL_CALL osl_mapFile (
|
|||||||
return osl_File_E_INVAL;
|
return osl_File_E_INVAL;
|
||||||
*ppAddr = 0;
|
*ppAddr = 0;
|
||||||
|
|
||||||
static sal_uInt64 const g_limit_size_t = std::numeric_limits< size_t >::max();
|
if (uLength > SAL_MAX_SIZE)
|
||||||
if (g_limit_size_t < uLength)
|
|
||||||
return osl_File_E_OVERFLOW;
|
return osl_File_E_OVERFLOW;
|
||||||
size_t const nLength = sal::static_int_cast< size_t >(uLength);
|
size_t const nLength = sal::static_int_cast< size_t >(uLength);
|
||||||
|
|
||||||
@@ -1190,8 +1189,7 @@ unmapFile (void* pAddr, sal_uInt64 uLength)
|
|||||||
if (0 == pAddr)
|
if (0 == pAddr)
|
||||||
return osl_File_E_INVAL;
|
return osl_File_E_INVAL;
|
||||||
|
|
||||||
static sal_uInt64 const g_limit_size_t = std::numeric_limits< size_t >::max();
|
if (uLength > SAL_MAX_SIZE)
|
||||||
if (g_limit_size_t < uLength)
|
|
||||||
return osl_File_E_OVERFLOW;
|
return osl_File_E_OVERFLOW;
|
||||||
size_t const nLength = sal::static_int_cast< size_t >(uLength);
|
size_t const nLength = sal::static_int_cast< size_t >(uLength);
|
||||||
|
|
||||||
|
@@ -104,7 +104,7 @@ static sal_uInt8* ImplSysReadConfig( const OUString& rFileName,
|
|||||||
sal_uInt64 nPos = 0;
|
sal_uInt64 nPos = 0;
|
||||||
if( aFile.getSize( nPos ) == ::osl::FileBase::E_None )
|
if( aFile.getSize( nPos ) == ::osl::FileBase::E_None )
|
||||||
{
|
{
|
||||||
if (nPos > std::numeric_limits< std::size_t >::max()) {
|
if (nPos > SAL_MAX_SIZE) {
|
||||||
aFile.close();
|
aFile.close();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -504,7 +504,7 @@ long WPXSvInputStreamImpl::tell()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sal_Int64 tmpPosition = mxSeekable->getPosition();
|
sal_Int64 tmpPosition = mxSeekable->getPosition();
|
||||||
if ((tmpPosition < 0) || (tmpPosition > (std::numeric_limits<long>::max)()))
|
if ((tmpPosition < 0) || (tmpPosition > LONG_MAX))
|
||||||
return -1L;
|
return -1L;
|
||||||
return (long)tmpPosition;
|
return (long)tmpPosition;
|
||||||
}
|
}
|
||||||
@@ -516,7 +516,7 @@ int WPXSvInputStreamImpl::seek(long offset)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
sal_Int64 tmpPosition = mxSeekable->getPosition();
|
sal_Int64 tmpPosition = mxSeekable->getPosition();
|
||||||
if ((tmpPosition < 0) || (tmpPosition > (std::numeric_limits<long>::max)()))
|
if ((tmpPosition < 0) || (tmpPosition > LONG_MAX))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
Reference in New Issue
Block a user