aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-11-30 22:08:44 +0000
committerD G Turner2019-11-30 22:08:44 +0000
commitaee09409e8b30dbd8ea10c9190b85037fe8458c9 (patch)
tree2cf8b40cca8d94d21985b60dea7bcf2443b6f7e7
parent88761ea49ce5244dc33a0784bbfba702f82d3241 (diff)
downloadscummvm-rg350-aee09409e8b30dbd8ea10c9190b85037fe8458c9.tar.gz
scummvm-rg350-aee09409e8b30dbd8ea10c9190b85037fe8458c9.tar.bz2
scummvm-rg350-aee09409e8b30dbd8ea10c9190b85037fe8458c9.zip
IMAGE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
-rw-r--r--image/codecs/bmp_raw.cpp2
-rw-r--r--image/codecs/indeo/indeo_dsp.cpp2
-rw-r--r--image/codecs/indeo4.cpp2
-rw-r--r--image/codecs/indeo5.cpp5
-rw-r--r--image/codecs/smc.cpp3
-rw-r--r--image/codecs/svq1.cpp6
-rw-r--r--image/iff.cpp4
-rw-r--r--image/jpeg.cpp4
-rw-r--r--image/pict.cpp2
9 files changed, 30 insertions, 0 deletions
diff --git a/image/codecs/bmp_raw.cpp b/image/codecs/bmp_raw.cpp
index 149136c5b4..257fa02b82 100644
--- a/image/codecs/bmp_raw.cpp
+++ b/image/codecs/bmp_raw.cpp
@@ -140,6 +140,8 @@ Graphics::PixelFormat BitmapRawDecoder::getPixelFormat() const {
case 24:
case 32:
return Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);
+ default:
+ break;
}
error("Unhandled BMP raw %dbpp", _bitsPerPixel);
diff --git a/image/codecs/indeo/indeo_dsp.cpp b/image/codecs/indeo/indeo_dsp.cpp
index 95ce3f3bf5..8e281aa530 100644
--- a/image/codecs/indeo/indeo_dsp.cpp
+++ b/image/codecs/indeo/indeo_dsp.cpp
@@ -563,6 +563,8 @@ static void iviMc ## size ##x## size ## suffix(int16 *buf, \
for (int j = 0; j < size; j++) \
OP(buf[j], (refBuf[j] + refBuf[j+1] + wptr[j] + wptr[j+1]) >> 2); \
break; \
+ default: \
+ break; \
} \
} \
\
diff --git a/image/codecs/indeo4.cpp b/image/codecs/indeo4.cpp
index a4eba85f49..8385658e3c 100644
--- a/image/codecs/indeo4.cpp
+++ b/image/codecs/indeo4.cpp
@@ -251,6 +251,8 @@ void Indeo4Decoder::switchBuffers() {
case IVI4_FRAMETYPE_INTER:
isPrevRef = 1;
break;
+ default:
+ break;
}
switch (_ctx._frameType) {
diff --git a/image/codecs/indeo5.cpp b/image/codecs/indeo5.cpp
index 790bdec87a..e36fb55d97 100644
--- a/image/codecs/indeo5.cpp
+++ b/image/codecs/indeo5.cpp
@@ -176,6 +176,7 @@ void Indeo5Decoder::switchBuffers() {
break;
case FRAMETYPE_INTER_NOREF:
+ default:
break;
}
@@ -192,6 +193,7 @@ void Indeo5Decoder::switchBuffers() {
case FRAMETYPE_INTER_SCAL:
case FRAMETYPE_INTER_NOREF:
case FRAMETYPE_NULL:
+ default:
break;
}
}
@@ -513,6 +515,9 @@ int Indeo5Decoder::decode_gop_header() {
band->_scan = _ffIviDirectScan4x4;
band->_transformSize = 4;
break;
+
+ default:
+ break;
}
band->_is2dTrans = band->_invTransform == IndeoDSP::ffIviInverseSlant8x8 ||
diff --git a/image/codecs/smc.cpp b/image/codecs/smc.cpp
index 54493d0c34..716b2f96fd 100644
--- a/image/codecs/smc.cpp
+++ b/image/codecs/smc.cpp
@@ -380,6 +380,9 @@ const Graphics::Surface *SMCDecoder::decodeFrame(Common::SeekableReadStream &str
case 0xF0:
warning("0xF0 opcode seen in SMC chunk (contact the developers)");
break;
+
+ default:
+ break;
}
}
diff --git a/image/codecs/svq1.cpp b/image/codecs/svq1.cpp
index eba5fb872a..5481967c07 100644
--- a/image/codecs/svq1.cpp
+++ b/image/codecs/svq1.cpp
@@ -657,6 +657,8 @@ bool SVQ1Decoder::svq1MotionInterBlock(Common::BitStream32BEMSB *ss, byte *curre
case 3:
putPixels16XY2C(dst, src, pitch, 16);
break;
+ default:
+ break;
}
return true;
@@ -737,6 +739,8 @@ bool SVQ1Decoder::svq1MotionInter4vBlock(Common::BitStream32BEMSB *ss, byte *cur
case 3:
putPixels8XY2C(dst, src, pitch, 8);
break;
+ default:
+ break;
}
// select next block
@@ -789,6 +793,8 @@ bool SVQ1Decoder::svq1DecodeDeltaBlock(Common::BitStream32BEMSB *ss, byte *curre
case SVQ1_BLOCK_INTRA:
resultValid = svq1DecodeBlockIntra(ss, current, pitch);
break;
+ default:
+ break;
}
return resultValid;
diff --git a/image/iff.cpp b/image/iff.cpp
index d75fffb31f..e0ac10858c 100644
--- a/image/iff.cpp
+++ b/image/iff.cpp
@@ -82,6 +82,10 @@ bool IFFDecoder::loadStream(Common::SeekableReadStream &stream) {
case ID_PBM:
_type = TYPE_PBM;
break;
+ case TYPE_UNKNOWN:
+ default:
+ _type = TYPE_UNKNOWN;
+ break;
}
if (type == TYPE_UNKNOWN) {
diff --git a/image/jpeg.cpp b/image/jpeg.cpp
index 2975cb1342..89e40ddf05 100644
--- a/image/jpeg.cpp
+++ b/image/jpeg.cpp
@@ -268,6 +268,8 @@ bool JPEGDecoder::loadStream(Common::SeekableReadStream &stream) {
case kColorSpaceYUV:
cinfo.out_color_space = JCS_YCbCr;
break;
+ default:
+ break;
}
// Actually start decompressing the image
@@ -290,6 +292,8 @@ bool JPEGDecoder::loadStream(Common::SeekableReadStream &stream) {
// This is pretty ugly since our PixelFormat cannot express YUV...
_surface.create(cinfo.output_width, cinfo.output_height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));
break;
+ default:
+ break;
}
// Allocate buffer for one scanline
diff --git a/image/pict.cpp b/image/pict.cpp
index a82bba034e..e7a65b80e5 100644
--- a/image/pict.cpp
+++ b/image/pict.cpp
@@ -421,6 +421,8 @@ void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool withPa
}
}
break;
+ default:
+ break;
}
delete[] buffer;