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

digitall 547637+digitall at users.noreply.github.com
Sun Oct 20 22:20:03 CEST 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:
deb6dc5357 PARALLACTION: Fix Missing Default Switch Cases


Commit: deb6dc53579338fafaf620180a931c289e9e1662
    https://github.com/scummvm/scummvm/commit/deb6dc53579338fafaf620180a931c289e9e1662
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-20T21:15:43+01:00

Commit Message:
PARALLACTION: Fix Missing Default Switch Cases

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

Changed paths:
    engines/parallaction/adlib.cpp
    engines/parallaction/debug.cpp
    engines/parallaction/gui_br.cpp
    engines/parallaction/input.cpp
    engines/parallaction/parallaction.cpp
    engines/parallaction/parallaction_br.cpp
    engines/parallaction/parallaction_ns.cpp
    engines/parallaction/parser.cpp
    engines/parallaction/sound_br.cpp
    engines/parallaction/sound_ns.cpp


diff --git a/engines/parallaction/adlib.cpp b/engines/parallaction/adlib.cpp
index a981a55..a644168 100644
--- a/engines/parallaction/adlib.cpp
+++ b/engines/parallaction/adlib.cpp
@@ -427,6 +427,8 @@ void AdLibDriver::send(uint32 b) {
 			// all notes off
 			allNotesOff();
 			break;
+		default:
+			break;
 		}
 		break;
 	case 12:
@@ -436,6 +438,8 @@ void AdLibDriver::send(uint32 b) {
 	case 14:
 		setPitchBend(channel, (param1 | (param2 << 7)) - 0x2000);
 		break;
+	default:
+		break;
 	}
 }
 
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index 0bf2bab..19022fb 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -83,7 +83,10 @@ bool Debugger::Cmd_Location(int argc, const char **argv) {
 
 	case 1:
 		debugPrintf("location <location name> [character name]\n");
+		break;
 
+	default:
+		break;
 	}
 
 	return true;
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index 17d759d..816ef16 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -443,6 +443,9 @@ public:
 
 		case 5:	// quit
 			return _helper->getState("quitdialog");
+
+		default:
+			break;
 		}
 
 		if (close) {
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index c62e747..8636c4c 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -245,6 +245,9 @@ int Input::updateInput() {
 	case kInputModeInventory:
 		updateInventoryInput();
 		break;
+
+	default:
+		break;
 	}
 
 	// when mode changes, then consider any input consumed
@@ -454,6 +457,9 @@ void Input::setMouseState(MouseTriState state) {
 	case MOUSE_ENABLED_SHOW:
 		CursorMan.showMouse(true);
 		break;
+
+	default:
+		break;
 	}
 }
 
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 9bf5491..ca0ff21 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -321,6 +321,9 @@ void Parallaction::runGame() {
 	case Input::kInputModeGame:
 		runGameFrame(event);
 		break;
+
+	default:
+		break;
 	}
 
 	if (shouldQuit())
@@ -423,6 +426,9 @@ void Parallaction::drawAnimation(AnimationPtr anim) {
 			scale = _location.getScale(anim->getZ());
 		}
 		break;
+
+	default:
+		break;
 	}
 
 	// updates the data for display
@@ -600,6 +606,9 @@ void Parallaction::runZone(ZonePtr z) {
 			return;
 		}
 		break;
+
+	default:
+		break;
 	}
 
 	debugC(3, kDebugExec, "runZone completed");
@@ -851,6 +860,9 @@ void Location::freeZones(bool removeAll) {
 		freeList(_zones, removeAll, Common::mem_fun(&Location::keepZone_br));
 		freeList(_animations, removeAll, Common::mem_fun(&Location::keepAnimation_br));
 		break;
+
+	default:
+		break;
 	}
 }
 
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 316e388..0662894 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -148,6 +148,8 @@ bool Parallaction_br::processGameEvent(int event) {
 		startIngameMenu();
 		c = false;
 		break;
+	default:
+		break;
 	}
 
 	_input->setArrowCursor();
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 53cda7b..c08c1d3 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -277,6 +277,9 @@ bool Parallaction_ns::processGameEvent(int event) {
 	case kEvLoadGame:
 		_saveLoad->loadGame();
 		break;
+
+	default:
+		break;
 	}
 
 	_input->setArrowCursor();
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp
index 725a8b5..940bfa3 100644
--- a/engines/parallaction/parser.cpp
+++ b/engines/parallaction/parser.cpp
@@ -190,6 +190,9 @@ char *Script::parseNextToken(char *s, char *tok, uint16 count, const char *brk)
 				count--;
 			}
 			break;
+
+		default:
+			break;
 		}
 
 	}
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index 0147d3c..41f9d9e 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -302,6 +302,8 @@ void MidiPlayer_MSC::send(uint32 b) {
 	case 0x07B0: // volume change
 		_channelsVolume[ch] = param2;
 		break;
+	default:
+		break;
 	}
 
 	sendToChannel(ch, b);
@@ -540,6 +542,9 @@ void SoundMan_br::execute(int command, const char *parm) {
 	case SC_PAUSE:
 		pause(b);
 		break;
+
+	default:
+		break;
 	}
 }
 
diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp
index 6073f82..d902cef 100644
--- a/engines/parallaction/sound_ns.cpp
+++ b/engines/parallaction/sound_ns.cpp
@@ -378,6 +378,9 @@ void SoundMan_ns::execute(int command, const char *parm = 0) {
 	case SC_PAUSE:
 		pause(b);
 		break;
+
+	default:
+		break;
 	}
 }
 





More information about the Scummvm-git-logs mailing list