From 89fe180fbcdfcd8ee3f52955a29eccd3b9ad0f36 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 22 Feb 2016 15:52:51 +0100 Subject: Silence -fsanitize=shift ("left shift of negative value") Change-Id: Ifa70183b86819c85611feda671fe76d4a2bf86d9 --- vcl/source/gdi/octree.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 81ba0031c5d0..7e54f077081b 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -256,9 +256,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) : long bdist = cBlue - x2; rdist = rdist*rdist + gdist*gdist + bdist*bdist; - const long crinc = ( xsqr - ( cRed << nBits ) ) << 1L; - const long cginc = ( xsqr - ( cGreen << nBits ) ) << 1L; - const long cbinc = ( xsqr - ( cBlue << nBits ) ) << 1L; + const long crinc = static_cast( xsqr - ( cRed << nBits ) ) << 1L; + const long cginc = static_cast( xsqr - ( cGreen << nBits ) ) << 1L; + const long cbinc = static_cast( xsqr - ( cBlue << nBits ) ) << 1L; sal_uLong* cdp = reinterpret_cast(pBuffer); sal_uInt8* crgbp = pMap; -- cgit