[Scummvm-git-logs] scummvm master -> 41bc2a52606e79aff693c93fb421e3facda87740

digitall dgturner at iee.org
Mon Sep 2 16:44:40 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:
41bc2a5260 GLK: GLUXE: Fix GCC Compiler Warnings


Commit: 41bc2a52606e79aff693c93fb421e3facda87740
    https://github.com/scummvm/scummvm/commit/41bc2a52606e79aff693c93fb421e3facda87740
Author: D G Turner (digitall at scummvm.org)
Date: 2019-09-02T15:39:04+01:00

Commit Message:
GLK: GLUXE: Fix GCC Compiler Warnings

These were for possible unintended fallthrough, though inspection
shows that these were occurring after fatal error handler calls so
adding breaks would not be an issue.

However, since these call error() and thus the breaks will not be
executed and are thus "dead" code, this might provoke warnings in
future.

Another solution would have been to comment that these fallthroughs
are intended, but breaks are better in case the error handler is
changed in future.

Changed paths:
    engines/glk/glulxe/exec.cpp
    engines/glk/glulxe/operand.cpp


diff --git a/engines/glk/glulxe/exec.cpp b/engines/glk/glulxe/exec.cpp
index cd26241..a48efb1 100644
--- a/engines/glk/glulxe/exec.cpp
+++ b/engines/glk/glulxe/exec.cpp
@@ -578,6 +578,7 @@ PerformJump: /* goto label for successful jumping... ironic, no? */
 				}
 #endif /* VM_DEBUGGER */
 				fatal_error_i("user debugtrap encountered.", inst[0].value);
+				break;
 
 			case op_jumpabs:
 				pc = inst[0].value;
diff --git a/engines/glk/glulxe/operand.cpp b/engines/glk/glulxe/operand.cpp
index d41b2b0..a880b74 100644
--- a/engines/glk/glulxe/operand.cpp
+++ b/engines/glk/glulxe/operand.cpp
@@ -508,6 +508,7 @@ WrLocalsAddr:
 			case 2:
 			case 3:
 				fatal_error("Constant addressing mode in store operand.");
+				break;
 
 			default:
 				fatal_error("Unknown addressing mode in store operand.");





More information about the Scummvm-git-logs mailing list