ICB: Fix GCC Identical Branch Compiler Warnings

This commit is contained in:
D G Turner 2021-11-11 10:21:59 +00:00
parent 430a980820
commit a2b81f837a
2 changed files with 8 additions and 2 deletions

View File

@ -84,13 +84,16 @@ void Init_play_movie(const char *param0, bool8 param1);
// runs the gamescript until a given bookmark then returns
// so the pc is set to the correct place for a mission....
void _game_script::Run_to_bookmark(const char *name) {
// FIXME: Branches are identical. Dead code or bug?
#if 0
if ((g_mission) && (g_mission->session)) {
// global
buf = private_session_resman->Res_open(fname, fn_hash, cluster, cluster_hash);
} else {
#endif
// global
buf = private_session_resman->Res_open(fname, fn_hash, cluster, cluster_hash);
}
//}
char command;
char p1[ENGINE_STRING_LEN];

View File

@ -287,14 +287,17 @@ bool mainLoopIteration() {
while (g_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN: {
// FIXME: All branches execute effectively the same code
#if 0
// Pass ENTER and BACKSPACE KEYDOWN events to WriteKey() so the save menu in options_manager_pc.cpp can see them.
if (event.kbd.keycode == Common::KEYCODE_RETURN) {
WriteKey((char)event.kbd.keycode);
} else if (event.kbd.keycode == Common::KEYCODE_BACKSPACE) {
WriteKey((char)event.kbd.keycode);
} else {
#endif
WriteKey(event.kbd.keycode);
}
//}
setKeyState(event.kbd.keycode, true);
break;
}