aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-09-02 15:39:04 +0100
committerD G Turner2019-09-02 15:39:04 +0100
commit41bc2a52606e79aff693c93fb421e3facda87740 (patch)
tree9464f8ab2c1fa9e0e86fdef2063cff6abe5a4dcd
parente376abf650137c0d4dfa0f424f3a035813e3f618 (diff)
downloadscummvm-rg350-41bc2a52606e79aff693c93fb421e3facda87740.tar.gz
scummvm-rg350-41bc2a52606e79aff693c93fb421e3facda87740.tar.bz2
scummvm-rg350-41bc2a52606e79aff693c93fb421e3facda87740.zip
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.
-rw-r--r--engines/glk/glulxe/exec.cpp1
-rw-r--r--engines/glk/glulxe/operand.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/engines/glk/glulxe/exec.cpp b/engines/glk/glulxe/exec.cpp
index cd26241700..a48efb1c75 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 d41b2b0fe7..a880b74b51 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.");