signed/unsigned comparison warnings
Change-Id: Ibc091869529ad290f3af3d87c82a5489ba22cc6f
This commit is contained in:
@@ -113,7 +113,7 @@ sal_uInt8 CGM::ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision )
|
||||
sal_Int32 CGM::ImplGetI( sal_uInt32 nPrecision )
|
||||
{
|
||||
sal_uInt8* pSource = mpSource + mnParaSize;
|
||||
if (mpEndValidSource - pSource < nPrecision)
|
||||
if (static_cast<sal_uIntPtr>(mpEndValidSource - pSource) < nPrecision)
|
||||
throw css::uno::Exception("attempt to read past end of input", nullptr);
|
||||
mnParaSize += nPrecision;
|
||||
switch( nPrecision )
|
||||
@@ -145,7 +145,7 @@ sal_Int32 CGM::ImplGetI( sal_uInt32 nPrecision )
|
||||
sal_uInt32 CGM::ImplGetUI( sal_uInt32 nPrecision )
|
||||
{
|
||||
sal_uInt8* pSource = mpSource + mnParaSize;
|
||||
if (mpEndValidSource - pSource < nPrecision)
|
||||
if (static_cast<sal_uIntPtr>(mpEndValidSource - pSource) < nPrecision)
|
||||
throw css::uno::Exception("attempt to read past end of input", nullptr);
|
||||
mnParaSize += nPrecision;
|
||||
switch( nPrecision )
|
||||
@@ -200,7 +200,7 @@ double CGM::ImplGetFloat( RealPrecision eRealPrecision, sal_uInt32 nRealSize )
|
||||
const bool bCompatible = false;
|
||||
#endif
|
||||
|
||||
if (mpEndValidSource - (mpSource + mnParaSize) < nRealSize)
|
||||
if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nRealSize)
|
||||
throw css::uno::Exception("attempt to read past end of input", nullptr);
|
||||
|
||||
if ( bCompatible )
|
||||
|
@@ -178,7 +178,7 @@ void CGM::ImplDoClass1()
|
||||
{
|
||||
sal_uInt32 nSize = ImplGetUI(1);
|
||||
|
||||
if (mpEndValidSource - (mpSource + mnParaSize) < nSize)
|
||||
if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
|
||||
throw css::uno::Exception("attempt to read past end of input", nullptr);
|
||||
|
||||
pElement->aFontList.InsertName( mpSource + mnParaSize, nSize );
|
||||
|
Reference in New Issue
Block a user