summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-27 15:51:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-27 21:51:13 +0200
commitd8bb4fa99104c3c30d880a4bec81571a5600f888 (patch)
tree2852fcc8e7e869829905a5dff3952253a7e8d633 /filter
parentadd a second argument to the odk_build-examples_test "template" (diff)
downloadcore-d8bb4fa99104c3c30d880a4bec81571a5600f888.tar.gz
core-d8bb4fa99104c3c30d880a4bec81571a5600f888.zip
ofz#7745 Undefined-shift
Change-Id: I673f9f2363e209694db2ba6074ae7078d0cebd4d Reviewed-on: https://gerrit.libreoffice.org/53568 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index f764c73e0bee..187910ad4c42 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -967,11 +967,11 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
}
}
const long nBlack = nSamp[ 3 ];
- nRed = static_cast<sal_uInt8>(std::max( 0L, 255L - ( ( static_cast<sal_Int32>(nSamp[ 0 ]) + nBlack - ( static_cast<sal_Int32>(nMinSampleValue) << 1 ) ) *
+ nRed = static_cast<sal_uInt8>(std::max( 0L, 255L - ( ( static_cast<sal_Int32>(nSamp[ 0 ]) + nBlack - static_cast<sal_Int32>(nMinSampleValue << 1U ) ) *
255L/static_cast<sal_Int32>(nMaxSampleValue-nMinSampleValue) ) ));
- nGreen = static_cast<sal_uInt8>(std::max( 0L, 255L - ( ( static_cast<sal_Int32>(nSamp[ 1 ]) + nBlack - ( static_cast<sal_Int32>(nMinSampleValue) << 1 ) ) *
+ nGreen = static_cast<sal_uInt8>(std::max( 0L, 255L - ( ( static_cast<sal_Int32>(nSamp[ 1 ]) + nBlack - static_cast<sal_Int32>(nMinSampleValue << 1U ) ) *
255L/static_cast<sal_Int32>(nMaxSampleValue-nMinSampleValue) ) ));
- nBlue = static_cast<sal_uInt8>(std::max( 0L, 255L - ( ( static_cast<sal_Int32>(nSamp[ 2 ]) + nBlack - ( static_cast<sal_Int32>(nMinSampleValue) << 1 ) ) *
+ nBlue = static_cast<sal_uInt8>(std::max( 0L, 255L - ( ( static_cast<sal_Int32>(nSamp[ 2 ]) + nBlack - static_cast<sal_Int32>(nMinSampleValue << 1U ) ) *
255L/static_cast<sal_Int32>(nMaxSampleValue-nMinSampleValue) ) ));
SetPixel(nY, nx, Color(static_cast<sal_uInt8>(nRed), static_cast<sal_uInt8>(nGreen), static_cast<sal_uInt8>(nBlue)));
}