summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-07 12:13:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-07 12:49:41 +0200
commit54bb1410eebce79e29ef33068efab59f0fb58881 (patch)
treef931f4a0fb0f57f2158faee266b9a933efaf2e54 /filter
parentclang-analyzer-deadcode.DeadStores (diff)
downloadcore-54bb1410eebce79e29ef33068efab59f0fb58881.tar.gz
core-54bb1410eebce79e29ef33068efab59f0fb58881.zip
clang-analyzer-deadcode.DeadStores
Change-Id: I028994045b13625e09589190e3cc259c49714e20
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index b569d5b27273..ea92080cacc3 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -215,11 +215,12 @@ bool RASReader::ImplReadHeader()
bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
{
sal_Int32 x, y;
- sal_uInt8 nDat = 0;
sal_uInt8 nRed, nGreen, nBlue;
switch ( mnDstBitsPerPix )
{
case 1 :
+ {
+ sal_uInt8 nDat = 0;
for (y = 0; y < mnHeight && mbStatus; ++y)
{
for (x = 0; x < mnWidth && mbStatus; ++x)
@@ -242,13 +243,14 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
}
}
break;
+ }
case 8 :
for (y = 0; y < mnHeight && mbStatus; ++y)
{
for (x = 0; x < mnWidth && mbStatus; ++x)
{
- nDat = ImplGetByte();
+ sal_uInt8 nDat = ImplGetByte();
pAcc->SetPixelIndex( y, x, nDat );
if (!m_rRAS.good())
mbStatus = false;
@@ -301,7 +303,7 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
{
for (x = 0; x < mnWidth && mbStatus; ++x)
{
- nDat = ImplGetByte(); // pad byte > nil
+ ImplGetByte(); // pad byte > nil
if ( mnType == RAS_TYPE_RGB_FORMAT )
{
nRed = ImplGetByte();