diff options
author | D G Turner | 2019-11-30 19:47:06 +0000 |
---|---|---|
committer | D G Turner | 2019-11-30 19:47:06 +0000 |
commit | b7b66c5049feb6748791bc514bf8869f470530f0 (patch) | |
tree | 9cd6182cfe191efc018553a6419346b8e7bac4c3 /video | |
parent | 46eafcf96be99c04aedcd8cdec69595a3c62a55b (diff) | |
download | scummvm-rg350-b7b66c5049feb6748791bc514bf8869f470530f0.tar.gz scummvm-rg350-b7b66c5049feb6748791bc514bf8869f470530f0.tar.bz2 scummvm-rg350-b7b66c5049feb6748791bc514bf8869f470530f0.zip |
VIDEO: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'video')
-rw-r--r-- | video/bink_decoder.cpp | 24 | ||||
-rw-r--r-- | video/dxa_decoder.cpp | 3 | ||||
-rw-r--r-- | video/flic_decoder.cpp | 1 | ||||
-rw-r--r-- | video/mpegps_decoder.cpp | 2 | ||||
-rw-r--r-- | video/smk_decoder.cpp | 4 |
5 files changed, 26 insertions, 8 deletions
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index 4074043768..170fab6495 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -1164,6 +1164,9 @@ void BinkDecoder::BinkVideoTrack::readDCTCoeffs(VideoFrame &video, int32 *block, coefList[listPos] = 0; modeList[listPos++] = 0; break; + + default: + break; } } } @@ -1256,16 +1259,21 @@ void BinkDecoder::BinkVideoTrack::readResidue(VideoFrame &video, int16 *block, i break; case 3: - nzCoeff[nzCoeffCount++] = binkScan[ccoef]; + { + nzCoeff[nzCoeffCount++] = binkScan[ccoef]; + + int sign = -(int)video.bits->getBit(); + block[binkScan[ccoef]] = (mask ^ sign) - sign; - int sign = -(int)video.bits->getBit(); - block[binkScan[ccoef]] = (mask ^ sign) - sign; + coefList[listPos] = 0; + modeList[listPos++] = 0; + masksCount--; + if (masksCount < 0) + return; + } + break; - coefList[listPos] = 0; - modeList[listPos++] = 0; - masksCount--; - if (masksCount < 0) - return; + default: break; } } diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp index b61f842341..97d13b05f3 100644 --- a/video/dxa_decoder.cpp +++ b/video/dxa_decoder.cpp @@ -381,6 +381,7 @@ void DXADecoder::DXAVideoTrack::decode13(int size) { switch (subMask & 0xC0) { // 00: skip case 0x00: + default: break; // 01: solid color case 0x40: { @@ -533,6 +534,8 @@ const Graphics::Surface *DXADecoder::DXAVideoTrack::decodeNextFrame() { case S_NONE: _surface->setPixels(_frameBuffer1); break; + default: + break; } // Copy in the relevant info to the Surface diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp index 9e797869c0..a3d8ff6bc7 100644 --- a/video/flic_decoder.cpp +++ b/video/flic_decoder.cpp @@ -307,6 +307,7 @@ void FlicDecoder::FlicVideoTrack::decodeDeltaFLC(uint8 *data) { packetCount = opcode; break; case OP_UNDEFINED: + default: break; case OP_LASTPIXEL: *((byte *)_surface->getBasePtr(getWidth() - 1, currentLine)) = (opcode & 0xFF); diff --git a/video/mpegps_decoder.cpp b/video/mpegps_decoder.cpp index 9b232ec792..2ec3262477 100644 --- a/video/mpegps_decoder.cpp +++ b/video/mpegps_decoder.cpp @@ -222,6 +222,8 @@ MPEGPSDecoder::PrivateStreamType MPEGPSDecoder::detectPrivateStreamType(Common:: return kPrivateStreamAC3; case 0xA0: return kPrivateStreamDVDPCM; + default: + break; } return kPrivateStreamUnknown; diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp index 55b43bd746..8db845f09b 100644 --- a/video/smk_decoder.cpp +++ b/video/smk_decoder.cpp @@ -675,6 +675,8 @@ void SmackerDecoder::SmackerVideoTrack::decodeFrame(Common::BitStreamMemory8LSB } } break; + default: + break; } ++block; } @@ -696,6 +698,8 @@ void SmackerDecoder::SmackerVideoTrack::decodeFrame(Common::BitStreamMemory8LSB ++block; } break; + default: + break; } } } |