diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-02 15:25:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-02 15:27:10 +0100 |
commit | 67bf8ecc6fb0018bf196bc59df736d2cbda7d053 (patch) | |
tree | f5dfd4be3c92d2d3cf25c3858f8d28a23bc829bb /filter/source | |
parent | 0e261a6908c2521a9967069095239eeb02810b8c (diff) |
signed/unsigned comparison warnings
Change-Id: Ibc091869529ad290f3af3d87c82a5489ba22cc6f
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/graphicfilter/icgm/cgm.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/class1.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index 6f0d171abfa5..714c4d73757e 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -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 ) diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx index 4d41add2448c..0d297bbe0a10 100644 --- a/filter/source/graphicfilter/icgm/class1.cxx +++ b/filter/source/graphicfilter/icgm/class1.cxx @@ -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 ); |