diff options
author | Paul Gilbert | 2019-07-06 16:14:54 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-07-06 16:14:54 -0700 |
commit | f282fbb49bf941c5b8ac1a2dd0b26a4a63978060 (patch) | |
tree | 3f1766cae5f5b4d8f00aa56938eff1e541eab4ca /engines | |
parent | 54b838cd6077e07f16e24d82cd9b7636f5a5b55d (diff) | |
download | scummvm-rg350-f282fbb49bf941c5b8ac1a2dd0b26a4a63978060.tar.gz scummvm-rg350-f282fbb49bf941c5b8ac1a2dd0b26a4a63978060.tar.bz2 scummvm-rg350-f282fbb49bf941c5b8ac1a2dd0b26a4a63978060.zip |
GLK: ALAN3: Fix gcc errors
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/alan3/glkio.cpp | 2 | ||||
-rw-r--r-- | engines/glk/alan3/instance.cpp | 9 | ||||
-rw-r--r-- | engines/glk/alan3/inter.cpp | 2 | ||||
-rw-r--r-- | engines/glk/alan3/version.h | 28 |
4 files changed, 23 insertions, 18 deletions
diff --git a/engines/glk/alan3/glkio.cpp b/engines/glk/alan3/glkio.cpp index c88e9fa74b..3f0da03333 100644 --- a/engines/glk/alan3/glkio.cpp +++ b/engines/glk/alan3/glkio.cpp @@ -125,7 +125,7 @@ void GlkIO::setStyle(int style) { } void GlkIO::statusLine(CONTEXT) { - uint32 glkWidth; + uint glkWidth; char line[100]; int pcol = col; diff --git a/engines/glk/alan3/instance.cpp b/engines/glk/alan3/instance.cpp index b738fd6a83..e1fab8d78a 100644 --- a/engines/glk/alan3/instance.cpp +++ b/engines/glk/alan3/instance.cpp @@ -289,10 +289,13 @@ bool isAt(int instance, int other, ATrans trans) { switch (trans) { case DIRECT: return admin[instance].location == other; + case INDIRECT: if (curr == other) return FALSE; curr = admin[curr].location; + // fall through + case TRANSITIVE: while (curr != 0) { if (curr == other) @@ -302,6 +305,7 @@ bool isAt(int instance, int other, ATrans trans) { } return FALSE; } + syserr("Unexpected value in switch in isAt() for location"); return FALSE; } else if (isALocation(other)) { @@ -309,11 +313,10 @@ bool isAt(int instance, int other, ATrans trans) { switch (trans) { case DIRECT: return admin[instance].location == other; - case INDIRECT: { + case INDIRECT: if (admin[instance].location == other) return FALSE; /* Directly, so not Indirectly */ - /* Fall through to transitive handling of the location */ - } + // fall through case TRANSITIVE: { int location = locationOf(instance); int curr = other; diff --git a/engines/glk/alan3/inter.cpp b/engines/glk/alan3/inter.cpp index 4708cf8bd3..5d70b393f2 100644 --- a/engines/glk/alan3/inter.cpp +++ b/engines/glk/alan3/inter.cpp @@ -254,6 +254,8 @@ static void depexec(Aword v) { break; case I_DEPCASE: instructionString = "DEPCASE"; + // fall through + case I_DEPELSE: if (lev == 1) { if (traceInstructionOption) diff --git a/engines/glk/alan3/version.h b/engines/glk/alan3/version.h index e2056ab52a..56c4098a5c 100644 --- a/engines/glk/alan3/version.h +++ b/engines/glk/alan3/version.h @@ -31,24 +31,24 @@ namespace Alan3 { typedef int64 Time; struct Version { - char *string; - int version; - int revision; - int correction; + const char *string; + int version; + int revision; + int correction; Time time; - const char *state; + const char *state; }; struct Product { - const char *name; - const char *slogan; - const char *shortHeader; - const char *longHeader; - const char *date; - const char *time; - const char *user; - const char *host; - const char *ostype; + const char *name; + const char *slogan; + const char *shortHeader; + const char *longHeader; + const char *date; + const char *time; + const char *user; + const char *host; + const char *ostype; Version version; }; |