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

digitall 547637+digitall at users.noreply.github.com
Sun Dec 1 01:12:27 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:
ef30ebc0bb SLUDGE: Fix Missing Default Switch Cases


Commit: ef30ebc0bb1f72d4ad12074ae6e808a2b8225af2
    https://github.com/scummvm/scummvm/commit/ef30ebc0bb1f72d4ad12074ae6e808a2b8225af2
Author: D G Turner (digitall at scummvm.org)
Date: 2019-12-01T01:08:45Z

Commit Message:
SLUDGE: Fix Missing Default Switch Cases

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

Changed paths:
    engines/sludge/builtin.cpp
    engines/sludge/fileset.cpp
    engines/sludge/transition.cpp


diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 185ff1a..05fdc20 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -82,6 +82,8 @@ bool failSecurityCheck(const Common::String &fn) {
 			case '|':
 				fatal("Filenames may not contain the following characters: \n\n\\  /  :  \"  <  >  |  ?  *\n\nConsequently, the following filename is not allowed:", fn);
 				return true;
+			default:
+				break;
 		}
 	}
 	return false;
@@ -123,6 +125,9 @@ static BuiltReturn sayCore(int numParams, LoadedFunction *fun, bool sayIt) {
 			//debugOut ("BUILTIN: sayCore: %s (%i)\n", newText, p);
 			fun->isSpeech = true;
 			return BR_KEEP_AND_PAUSE;
+
+		default:
+			break;
 	}
 
 	fatal("Function should have either 2 or 3 parameters");
diff --git a/engines/sludge/fileset.cpp b/engines/sludge/fileset.cpp
index 4f671eb..4a02d60 100644
--- a/engines/sludge/fileset.cpp
+++ b/engines/sludge/fileset.cpp
@@ -182,6 +182,9 @@ Common::String ResourceManager::convertString(const Common::String &s) {
 				// falls through
 			case 1:
 				r = wc + r;
+				break;
+			default:
+				break;
 		}
 		res += r;
 	}
diff --git a/engines/sludge/transition.cpp b/engines/sludge/transition.cpp
index 35f650e..0e6d28b 100644
--- a/engines/sludge/transition.cpp
+++ b/engines/sludge/transition.cpp
@@ -403,7 +403,8 @@ void GraphicsManager::fixBrightness() {
 		case 6:
 			transitionSnapshotBox();
 			break;
-
+		default:
+			break;
 	}
 }
 




More information about the Scummvm-git-logs mailing list