diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-02-22 15:52:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-02-22 15:52:51 +0100 |
commit | 89fe180fbcdfcd8ee3f52955a29eccd3b9ad0f36 (patch) | |
tree | 672194415a6d9c4b8f528b9b3cca1ffaedfb219f | |
parent | bc9aa454ff63a7aa308b84c0170c48dc5267c040 (diff) |
Silence -fsanitize=shift ("left shift of negative value")
Change-Id: Ifa70183b86819c85611feda671fe76d4a2bf86d9
-rw-r--r-- | vcl/source/gdi/octree.cxx | 6 |
1 files 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<unsigned long>( xsqr - ( cRed << nBits ) ) << 1L; + const long cginc = static_cast<unsigned long>( xsqr - ( cGreen << nBits ) ) << 1L; + const long cbinc = static_cast<unsigned long>( xsqr - ( cBlue << nBits ) ) << 1L; sal_uLong* cdp = reinterpret_cast<sal_uLong*>(pBuffer); sal_uInt8* crgbp = pMap; |