From 681872593c83dbab9a98352f9a1a74a0d059e5ec Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 25 Jan 2020 13:32:31 +0100 Subject: Avoid explicit cast to smaller sal_uInt16 from larger int ...in what might be an attempt to avoid warnings about signed vs. unsigned comparisons. Change-Id: Id175c2b29c094de5857a680243aebaf2fe10df99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87394 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/unx/generic/print/genprnpsp.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx index e7570538070c..7b985ff425bc 100644 --- a/vcl/unx/generic/print/genprnpsp.cxx +++ b/vcl/unx/generic/print/genprnpsp.cxx @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -716,7 +717,7 @@ OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_ if( aData.m_pParser ) { const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( "InputSlot" ): nullptr; - if( ! pKey || nPaperBin >= static_cast(pKey->countValues()) ) + if( ! pKey || nPaperBin >= o3tl::make_unsigned(pKey->countValues()) ) return aData.m_pParser->getDefaultInputSlot(); const PPDValue* pValue = pKey->getValue( nPaperBin ); if( pValue ) -- cgit