VIDEO: Fix Missing Default Switch Cases

These are flagged by GCC if -Wswitch-default is enabled.
This commit is contained in:
D G Turner 2019-11-30 19:47:06 +00:00
parent 46eafcf96b
commit b7b66c5049
5 changed files with 26 additions and 8 deletions

View file

@ -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;
coefList[listPos] = 0;
modeList[listPos++] = 0;
masksCount--;
if (masksCount < 0)
return;
}
break;
default:
break;
}
}

View file

@ -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

View file

@ -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);

View file

@ -222,6 +222,8 @@ MPEGPSDecoder::PrivateStreamType MPEGPSDecoder::detectPrivateStreamType(Common::
return kPrivateStreamAC3;
case 0xA0:
return kPrivateStreamDVDPCM;
default:
break;
}
return kPrivateStreamUnknown;

View file

@ -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;
}
}
}