diff options
author | Matthew Hoops | 2012-05-12 20:27:48 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-05-12 20:27:48 -0400 |
commit | b2506abccf6aa64da31b497b45fe0e1949530053 (patch) | |
tree | fce0ae0324339b338f11f14248ecb02e8a21af15 /engines/pegasus | |
parent | 175befc3f127d547f94ff83a688f72c88996f2b9 (diff) | |
download | scummvm-rg350-b2506abccf6aa64da31b497b45fe0e1949530053.tar.gz scummvm-rg350-b2506abccf6aa64da31b497b45fe0e1949530053.tar.bz2 scummvm-rg350-b2506abccf6aa64da31b497b45fe0e1949530053.zip |
PEGASUS: Fix some warnings found with optimizations on
Diffstat (limited to 'engines/pegasus')
-rw-r--r-- | engines/pegasus/items/biochips/opticalchip.cpp | 6 | ||||
-rw-r--r-- | engines/pegasus/items/biochips/pegasuschip.cpp | 2 | ||||
-rw-r--r-- | engines/pegasus/neighborhood/caldoria/caldoria.cpp | 2 | ||||
-rw-r--r-- | engines/pegasus/neighborhood/tsa/fulltsa.cpp | 6 |
4 files changed, 13 insertions, 3 deletions
diff --git a/engines/pegasus/items/biochips/opticalchip.cpp b/engines/pegasus/items/biochips/opticalchip.cpp index 6a9a41d573..0f60981955 100644 --- a/engines/pegasus/items/biochips/opticalchip.cpp +++ b/engines/pegasus/items/biochips/opticalchip.cpp @@ -138,9 +138,6 @@ void OpticalChip::playOpMemMovie(HotSpotID id) { ItemState state = getItemState(), newState; switch (state) { - case kOptical000: - // Can never happen. - break; case kOptical001: newState = kOptical002; break; @@ -176,6 +173,9 @@ void OpticalChip::playOpMemMovie(HotSpotID id) { else newState = kOptical211; break; + case kOptical000: // Can never happen. + default: + error("Invalid optical chip state"); } setItemState(newState); diff --git a/engines/pegasus/items/biochips/pegasuschip.cpp b/engines/pegasus/items/biochips/pegasuschip.cpp index 320662af06..c0c3f6bb9e 100644 --- a/engines/pegasus/items/biochips/pegasuschip.cpp +++ b/engines/pegasus/items/biochips/pegasuschip.cpp @@ -153,6 +153,8 @@ void PegasusChip::clickInPegasusHotspot() { case kPegasusWSC10: hiliteState = kPegasusWSC11; break; + default: + error("Invalid pegasus chip state"); } // WORKAROUND: The original called setItemState() here. However, diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp index dedfd88aa8..0e5868cb7d 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp @@ -1495,6 +1495,8 @@ void Caldoria::clickOnDoorbell(const HotSpotID doorBellSpotID) { case kCaldoria35DoorbellSpotID: extra = kCaldoria35Doorbell; break; + default: + error("Invalid doorbell hotspot"); } getExtraEntry(extra, entry); diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp index 0ed3355a10..ccc08348fa 100644 --- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp +++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp @@ -1640,6 +1640,8 @@ void FullTSA::playTBPMonitor() { extra = kTSA0BTBPProcedure; GameState.setScoringSawProcedure(true); break; + default: + error("Invalid monitor mode"); } GameState.setT0BMonitorMode(GameState.getT0BMonitorMode() | kPlayingTBPMask); @@ -1796,6 +1798,8 @@ void FullTSA::playLeftComparison() { extra = kTSA0BWSCAltered; GameState.setScoringSawWSCAltered(true); break; + default: + error("Invalid monitor mode"); } GameState.setT0BMonitorMode(GameState.getT0BMonitorMode() | kPlayingLeftComparisonMask); @@ -1846,6 +1850,8 @@ void FullTSA::playRightComparison() { extra = kTSA0BWSCUnaltered; GameState.setScoringSawWSCNormal(true); break; + default: + error("Invalid monitor mode"); } GameState.setT0BMonitorMode(GameState.getT0BMonitorMode() | kPlayingRightComparisonMask); |