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

digitall 547637+digitall at users.noreply.github.com
Sat Nov 30 23:54:43 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:
c2149c042e TITANIC: Fix Missing Default Switch Cases


Commit: c2149c042e03930fea0eaed252a630ca63ec6af6
    https://github.com/scummvm/scummvm/commit/c2149c042e03930fea0eaed252a630ca63ec6af6
Author: D G Turner (digitall at scummvm.org)
Date: 2019-11-30T23:50:44Z

Commit Message:
TITANIC: Fix Missing Default Switch Cases

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

Changed paths:
    engines/titanic/game/chev_code.cpp
    engines/titanic/game/fan.cpp
    engines/titanic/game/transport/pellerator.cpp
    engines/titanic/game/transport/service_elevator.cpp
    engines/titanic/npcs/deskbot.cpp
    engines/titanic/npcs/doorbot.cpp
    engines/titanic/sound/music_room_instrument.cpp
    engines/titanic/star_control/star_camera.cpp
    engines/titanic/star_control/star_control.cpp
    engines/titanic/star_control/surface_area.cpp
    engines/titanic/true_talk/barbot_script.cpp
    engines/titanic/true_talk/bellbot_script.cpp
    engines/titanic/true_talk/deskbot_script.cpp
    engines/titanic/true_talk/liftbot_script.cpp
    engines/titanic/true_talk/maitred_script.cpp


diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp
index 6c27b1f..8b08ce8 100644
--- a/engines/titanic/game/chev_code.cpp
+++ b/engines/titanic/game/chev_code.cpp
@@ -250,6 +250,9 @@ bool CChevCode::CheckChevCode(CCheckChevCode *msg) {
 				else
 					classNum = 5;
 				break;
+
+			default:
+				break;
 			}
 		}
 	}
diff --git a/engines/titanic/game/fan.cpp b/engines/titanic/game/fan.cpp
index a115a56..08d2c8f 100644
--- a/engines/titanic/game/fan.cpp
+++ b/engines/titanic/game/fan.cpp
@@ -57,6 +57,8 @@ bool CFan::EnterViewMsg(CEnterViewMsg *msg) {
 	case 2:
 		playMovie(63, 65, MOVIE_REPEAT);
 		break;
+	default:
+		break;
 	}
 
 	return true;
diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp
index 55f701f..7d8dda1 100644
--- a/engines/titanic/game/transport/pellerator.cpp
+++ b/engines/titanic/game/transport/pellerator.cpp
@@ -127,7 +127,10 @@ bool CPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
 					playMovie(3, 71, 0);
 					for (int idx = 0; idx < 3; ++idx)
 						playMovie(299, 304, 0);
+					break;
 
+				default:
+					break;
 				}
 			}
 		} else {
diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp
index e3e6306..adae8e0 100644
--- a/engines/titanic/game/transport/service_elevator.cpp
+++ b/engines/titanic/game/transport/service_elevator.cpp
@@ -97,6 +97,8 @@ bool CServiceElevator::ServiceElevatorMsg(CServiceElevatorMsg *msg) {
 		case 3:
 			_v3 = 2;
 			break;
+		default:
+			break;
 		}
 
 		CServiceElevatorFloorRequestMsg requestMsg;
diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp
index 825e129..d3ad23b 100644
--- a/engines/titanic/npcs/deskbot.cpp
+++ b/engines/titanic/npcs/deskbot.cpp
@@ -239,10 +239,15 @@ bool CDeskbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
 		break;
 
 	case 26:
-		_npcFlags |= NPCFLAG_MOVE_FINISH;
-		CTurnOff turnOff;
-		turnOff.execute(this);
-		lockMouse();
+		{
+			_npcFlags |= NPCFLAG_MOVE_FINISH;
+			CTurnOff turnOff;
+			turnOff.execute(this);
+			lockMouse();
+		}
+		break;
+
+	default:
 		break;
 	}
 
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 5512468..aae1914 100644
--- a/engines/titanic/npcs/doorbot.cpp
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -218,6 +218,9 @@ bool CDoorbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
 		dismissMsg.execute(this);
 		break;
 	}
+
+	default:
+		break;
 	}
 
 	return true;
diff --git a/engines/titanic/sound/music_room_instrument.cpp b/engines/titanic/sound/music_room_instrument.cpp
index 99ead2f..15ba768 100644
--- a/engines/titanic/sound/music_room_instrument.cpp
+++ b/engines/titanic/sound/music_room_instrument.cpp
@@ -84,6 +84,9 @@ CMusicRoomInstrument::CMusicRoomInstrument(CProjectItem *project, CSoundManager
 		_gameObjects[2] = static_cast<CGameObject *>(_project->findByName("Snake_Head"));
 		_insStartTime = 0.17;
 		break;
+
+	default:
+		break;
 	}
 }
 
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index 4a5515f..fa1c8f2 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -392,6 +392,7 @@ void CStarCamera::setViewportAngle(const FPoint &angles) {
 	// All three stars are locked on in this case so the camera does not move
 	// in response to the users mouse movements
 	case THREE_LOCKED:
+	default:
 		break;
 	}
 }
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp
index 7922a2f..95ae388 100644
--- a/engines/titanic/star_control/star_control.cpp
+++ b/engines/titanic/star_control/star_control.cpp
@@ -261,6 +261,9 @@ void CStarControl::doAction(StarControlAction action) {
 	case STAR_19:
 		_view.starDestinationSet();
 		break;
+
+	default:
+		break;
 	}
 }
 
diff --git a/engines/titanic/star_control/surface_area.cpp b/engines/titanic/star_control/surface_area.cpp
index a4b8d44..c34ba1e 100644
--- a/engines/titanic/star_control/surface_area.cpp
+++ b/engines/titanic/star_control/surface_area.cpp
@@ -116,6 +116,9 @@ void CSurfaceArea::pixelToRGB(uint pixel, uint *rgb) {
 	case 4:
 		*rgb = pixel;
 		break;
+
+	default:
+		break;
 	}
 }
 
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp
index 241976f..b9f3e3a 100644
--- a/engines/titanic/true_talk/barbot_script.cpp
+++ b/engines/titanic/true_talk/barbot_script.cpp
@@ -851,6 +851,8 @@ ScriptChangedResult BarbotScript::scriptChanged(const TTroomScript *roomScript,
 		addResponse(getDialogueId(250579));
 		break;
 
+	default:
+		break;
 	}
 
 	if (id >= 250000 && id <= 251900) {
diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp
index 46c5775..561cbd2 100644
--- a/engines/titanic/true_talk/bellbot_script.cpp
+++ b/engines/titanic/true_talk/bellbot_script.cpp
@@ -156,6 +156,9 @@ int BellbotScript::process(const TTroomScript *roomScript, const TTsentence *sen
 				result = processEntries(&_sentences[getValue(6) ? 5 : 4], 0, roomScript, sentence);
 			}
 			break;
+
+		default:
+			break;
 		}
 
 		if (result == 2)
diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp
index 3988002..1632df2 100644
--- a/engines/titanic/true_talk/deskbot_script.cpp
+++ b/engines/titanic/true_talk/deskbot_script.cpp
@@ -175,6 +175,9 @@ ScriptChangedResult DeskbotScript::scriptChanged(const TTroomScript *roomScript,
 	case 150:
 		CTrueTalkManager::setFlags(2, 1);
 		break;
+
+	default:
+		break;
 	}
 
 	return SCR_2;
diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp
index 6dfa8d8..9afbf5f 100644
--- a/engines/titanic/true_talk/liftbot_script.cpp
+++ b/engines/titanic/true_talk/liftbot_script.cpp
@@ -320,6 +320,8 @@ int LiftbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence
 	case MKTAG('T', 'R', 'A', '3'):
 		tag2 = MKTAG('T', 'R', 'A', 'V');
 		break;
+	default:
+		break;
 	}
 
 	return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
diff --git a/engines/titanic/true_talk/maitred_script.cpp b/engines/titanic/true_talk/maitred_script.cpp
index 99e9c04..6c212cb 100644
--- a/engines/titanic/true_talk/maitred_script.cpp
+++ b/engines/titanic/true_talk/maitred_script.cpp
@@ -484,6 +484,8 @@ int MaitreDScript::handleQuote(const TTroomScript *roomScript, const TTsentence
 	case MKTAG('T', 'R', 'A', '3'):
 		tag2 = MKTAG('T', 'R', 'A', 'V');
 		break;
+	default:
+		break;
 	}
 
 	return TTnpcScript::handleQuote(roomScript, sentence, tag1, tag2, remainder);
@@ -1062,6 +1064,9 @@ int MaitreDScript::preprocess(const TTroomScript *roomScript, const TTsentence *
 			applyFlag = true;
 		}
 		break;
+
+	default:
+		break;
 	}
 
 	if (applyFlag)




More information about the Scummvm-git-logs mailing list