IMAGE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
This commit is contained in:
parent
88761ea49c
commit
aee09409e8
9 changed files with 30 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
|
|
|
@ -251,6 +251,8 @@ void Indeo4Decoder::switchBuffers() {
|
|||
case IVI4_FRAMETYPE_INTER:
|
||||
isPrevRef = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (_ctx._frameType) {
|
||||
|
|
|
@ -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 ||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -421,6 +421,8 @@ void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool withPa
|
|||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
delete[] buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue