From 9ac4df52a1964b4a9883d4fe176a1591c536a8a5 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 19 Oct 2019 19:53:15 +0100 Subject: GROOVIE: Fix Missing Default Switch Cases These are flagged by GCC if -Wswitch-default is enabled. --- engines/groovie/cell.cpp | 2 ++ engines/groovie/groovie.cpp | 4 ++++ engines/groovie/roq.cpp | 4 ++++ engines/groovie/script.cpp | 6 ++++++ 4 files changed, 16 insertions(+) (limited to 'engines') diff --git a/engines/groovie/cell.cpp b/engines/groovie/cell.cpp index 5fceb8f74e..3177963a38 100644 --- a/engines/groovie/cell.cpp +++ b/engines/groovie/cell.cpp @@ -297,6 +297,8 @@ void CellGame::countAllCells() { case 4: _board[52]++; break; + default: + break; } } } diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 8edbb2947d..3b21dd5dbb 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -119,6 +119,8 @@ Common::Error GroovieEngine::run() { initGraphics(640, 480); _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); break; + default: + break; } // Create debugger. It requires GFX to be initialized @@ -162,6 +164,8 @@ Common::Error GroovieEngine::run() { _videoPlayer = new ROQPlayer(this); #endif break; + default: + break; } // Detect ScummVM Music Enhancement Project presence (T7G only) diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 2e9a394c53..a26d90a82d 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -437,6 +437,8 @@ void ROQPlayer::processBlockQuadVectorBlock(int baseX, int baseY, int8 Mx, int8 } } break; + default: + break; } } @@ -463,6 +465,8 @@ void ROQPlayer::processBlockQuadVectorBlockSub(int baseX, int baseY, int8 Mx, in paint2(_file->readByte(), baseX , baseY + 2); paint2(_file->readByte(), baseX + 2, baseY + 2); break; + default: + break; } } diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index c66f0f597c..376519c577 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -58,6 +58,9 @@ Script::Script(GroovieEngine *vm, EngineVersion version) : case kGroovieV2: _opcodes = _opcodesV2; break; + default: + _opcodes = nullptr; + break; } // Prepare the variables @@ -566,6 +569,9 @@ void Script::o_videofromref() { // 0x09 debugCN(1, kDebugScript, " (This video is special somehow!)"); warning("(This video (0x%04X) is special somehow!)", fileref); } + + default: + break; } if (fileref != _videoRef) { debugCN(1, kDebugScript, "\n"); -- cgit v1.2.3