[Scummvm-git-logs] scummvm master -> b7b66c5049feb6748791bc514bf8869f470530f0

digitall 547637+digitall at users.noreply.github.com
Sat Nov 30 19:50:50 UTC 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b7b66c5049 VIDEO: Fix Missing Default Switch Cases


Commit: b7b66c5049feb6748791bc514bf8869f470530f0
    https://github.com/scummvm/scummvm/commit/b7b66c5049feb6748791bc514bf8869f470530f0
Author: D G Turner (digitall at scummvm.org)
Date: 2019-11-30T19:47:06Z

Commit Message:
VIDEO: Fix Missing Default Switch Cases

These are flagged by GCC if -Wswitch-default is enabled.

Changed paths:
    video/bink_decoder.cpp
    video/dxa_decoder.cpp
    video/flic_decoder.cpp
    video/mpegps_decoder.cpp
    video/smk_decoder.cpp


diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 4074043..170fab6 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 b61f842..97d13b0 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 9e79786..a3d8ff6 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 9b232ec..2ec3262 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 55b43bd..8db845f 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;
 		}
 	}
 }




More information about the Scummvm-git-logs mailing list