From b66c5f77d150056b2de262dae66301fcd7dc38c1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 3 Feb 2020 16:21:55 +0100 Subject: loplugin:unsignedcompare (clang-cl) Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- dtrans/source/win32/dtobj/FmtFilter.cxx | 4 +++- dtrans/source/win32/dtobj/XTDataObject.cxx | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'dtrans') diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 74df67541140..e9c4b42f8b68 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -20,6 +20,8 @@ #include #include "FmtFilter.hxx" + +#include #include #include @@ -176,7 +178,7 @@ HENHMETAFILE OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePic Sequence< sal_Int8 > WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB ) { - OSL_ENSURE(sal_uInt32(aWinDIB.getLength()) > sizeof(BITMAPINFOHEADER), "CF_DIBV5/CF_DIB too small (!)"); + OSL_ENSURE(o3tl::make_unsigned(aWinDIB.getLength()) > sizeof(BITMAPINFOHEADER), "CF_DIBV5/CF_DIB too small (!)"); Sequence< sal_Int8 > ooBmpStream; ooBmpStream.realloc(aWinDIB.getLength( ) + sizeof(BITMAPFILEHEADER)); diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 6df5c9d384c1..01b1ce39fce4 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -19,6 +19,7 @@ #include #include +#include #include "XTDataObject.hxx" #include @@ -368,11 +369,11 @@ void CXTDataObject::renderAnyDataAndSetupStgMedium( #ifdef DBG_UTIL if(CF_DIBV5 == fetc.cfFormat) { - OSL_ENSURE(sal_uInt32(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPV5HEADER)), "Wrong size on CF_DIBV5 data (!)"); + OSL_ENSURE(o3tl::make_unsigned(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPV5HEADER)), "Wrong size on CF_DIBV5 data (!)"); } else // CF_DIB == fetc.cfFormat { - OSL_ENSURE(sal_uInt32(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)), "Wrong size on CF_DIB data (!)"); + OSL_ENSURE(o3tl::make_unsigned(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)), "Wrong size on CF_DIB data (!)"); } #endif -- cgit