summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-25 13:32:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-25 18:26:47 +0100
commit681872593c83dbab9a98352f9a1a74a0d059e5ec (patch)
tree6654eb2419cac59a261e0ae51e357c29c740f336
parentdb421c41a5cf50303b72a8fd32cd29c500cc113f (diff)
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 <sbergman@redhat.com>
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx3
1 files changed, 2 insertions, 1 deletions
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 <sys/stat.h>
#include <comphelper/fileurl.hxx>
+#include <o3tl/safeint.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
@@ -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<sal_uInt16>(pKey->countValues()) )
+ if( ! pKey || nPaperBin >= o3tl::make_unsigned(pKey->countValues()) )
return aData.m_pParser->getDefaultInputSlot();
const PPDValue* pValue = pKey->getValue( nPaperBin );
if( pValue )