summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-23 11:01:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-23 12:24:01 +0100
commit0858bae3c12dc81b87a78bb0522b0dff12bbf188 (patch)
treedcea37a1a318428366e177a06310d34175d8790a /vcl
parent5fe5c3a3f485f925a327cdc7b95c8691f6078608 (diff)
Avoid explicit cast to smaller sal_uInt32 from larger long
...in what might be an attempt to avoid warnings about signed vs. unsigned comparisons Change-Id: I17fca3d13628dedbb7044ffd8a585688fd81b045 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87250 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/png/pngread.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/filter/png/pngread.cxx b/vcl/source/filter/png/pngread.cxx
index 1e89657cb807..d6908a9bcccf 100644
--- a/vcl/source/filter/png/pngread.cxx
+++ b/vcl/source/filter/png/pngread.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
#include <sal/log.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <cassert>
@@ -936,7 +937,7 @@ void PNGReaderImpl::ImplReadIDAT()
mnYpos += mnYAdd;
}
- if ( mnYpos >= static_cast<sal_uInt32>(maOrigSize.Height()) )
+ if ( mnYpos >= o3tl::make_unsigned(maOrigSize.Height()) )
{
if( (mnPass < 7) && mnInterlaceType )
if( ImplPreparePass() )