From 29aef74f6619e943b820497cb2a22175a8870804 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 9 Nov 2019 03:24:47 +0000 Subject: TOON: Fix Missing Default Switch Cases These are flagged by GCC if -Wswitch-default is enabled. --- engines/toon/picture.cpp | 2 ++ engines/toon/toon.cpp | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp index 51077c0b17..4d9e45aacd 100644 --- a/engines/toon/picture.cpp +++ b/engines/toon/picture.cpp @@ -127,6 +127,8 @@ bool Picture::loadPicture(const Common::String &file) { _height = TOON_SCREEN_HEIGHT; return true; } + default: + break; } return false; } diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index d0a4059402..46132a4fd2 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -1064,6 +1064,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { case MAINMENUHOTSPOT_HOTKEYSCLOSE: menuMask = MAINMENUMASK_BASE; continue; + default: + break; } if (musicPlaying) { @@ -1098,6 +1100,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { exitGame = true; doExit = true; break; + default: + break; } } @@ -2886,7 +2890,7 @@ int32 ToonEngine::runConversationCommand(int16 **command) { } break; case 103: - return result; + default: break; } return result; @@ -3972,7 +3976,6 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) { break; case 21: switch (itemSrc) { - case 107: characterTalk(1296); replaceItemFromInventory(107, 109); @@ -4001,6 +4004,8 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) { setCursor(0, false, 0, 0); rearrangeInventory(); return 1; + default: + break; } break; case 22: @@ -4316,6 +4321,8 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) { setCursor(0, false, 0, 0); rearrangeInventory(); return 1; + default: + break; } break; case 71: @@ -4628,6 +4635,9 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) { } else if (itemSrc == 0x59 || itemSrc == 0x52) { characterTalk(1496); } + break; + default: + break; } return 0; } @@ -4822,6 +4832,8 @@ int32 ToonEngine::handleInventoryOnDrew(int32 itemId) { runEventScript(_mouseX, _mouseY, 2, 108, 0); } return 1; + default: + break; } return 0; } -- cgit v1.2.3