diff options
author | D G Turner | 2019-12-16 07:36:33 +0000 |
---|---|---|
committer | D G Turner | 2019-12-16 07:36:33 +0000 |
commit | fc813901ff1fb2e550c7c61cb269ec0498661a2b (patch) | |
tree | 9de19e06f5d5f44874659034487de3a3c0be4fd3 /engines/glk | |
parent | 63789ac6982f1f5257fe2d800000f0c9065baf96 (diff) | |
download | scummvm-rg350-fc813901ff1fb2e550c7c61cb269ec0498661a2b.tar.gz scummvm-rg350-fc813901ff1fb2e550c7c61cb269ec0498661a2b.tar.bz2 scummvm-rg350-fc813901ff1fb2e550c7c61cb269ec0498661a2b.zip |
GLK: AGT: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/agt/debugcmd.cpp | 8 | ||||
-rw-r--r-- | engines/glk/agt/exec.cpp | 6 | ||||
-rw-r--r-- | engines/glk/agt/metacommand.cpp | 1 | ||||
-rw-r--r-- | engines/glk/agt/token.cpp | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/engines/glk/agt/debugcmd.cpp b/engines/glk/agt/debugcmd.cpp index 83be57ac0c..17fad335ec 100644 --- a/engines/glk/agt/debugcmd.cpp +++ b/engines/glk/agt/debugcmd.cpp @@ -182,6 +182,8 @@ static void var_edit(int vtype) case 2: writeln("Flags ( f=false [OFF] and t=true [ON] )"); break; + default: + break; } writeln(""); for (i = 0; i <= imax; i++) { @@ -195,6 +197,8 @@ static void var_edit(int vtype) case 2: sprintf(sbuff, "%3d%c", i, flag[i] ? 't' : 'f'); break; + default: + break; } writetbl(sbuff, (vtype == 2) ? 5 : 20); } @@ -211,6 +215,8 @@ static void var_edit(int vtype) case 2: writestr("Flag to toggle"); break; + default: + break; } writestr(" (-1 to quit): "); i = read_number(); @@ -301,6 +307,8 @@ static void writegender(const char *gendername, uchar genderval) { case 0: writestr("Thing"); break; + default: + break; } next_col(); } diff --git a/engines/glk/agt/exec.cpp b/engines/glk/agt/exec.cpp index 983002aa44..9e69747a20 100644 --- a/engines/glk/agt/exec.cpp +++ b/engines/glk/agt/exec.cpp @@ -106,6 +106,8 @@ void set_statline() { case 5: sprintf(r_stat, "Score: %ld", tscore); break; + default: + break; } } @@ -204,6 +206,7 @@ static word it_pronoun(int item, rbool ind_form) if (tcreat(item)) switch (creature[item - first_creat].gender) { case 0: + default: return ext_code[wit]; case 1: return (ind_form ? ext_code[wher] : ext_code[wshe]); @@ -484,6 +487,7 @@ static char *wordvar_match(const char **pvarname, char match_type, /* Now need to fix capitalization */ switch (capstate(start)) { case 0: + default: break; /* $word$ */ case 1: /* $WORD$ */ for (i = 0; fill_buff[i] != '\0'; i++) @@ -1243,6 +1247,8 @@ static void set_pronoun(int item) { case 2: last_he = item; break; + default: + break; } } diff --git a/engines/glk/agt/metacommand.cpp b/engines/glk/agt/metacommand.cpp index 9324a0b054..52b3b9564a 100644 --- a/engines/glk/agt/metacommand.cpp +++ b/engines/glk/agt/metacommand.cpp @@ -1038,6 +1038,7 @@ int scan_metacommand(integer m_actor, int vcode, /* We are doing disambiguation and reached an action token */ case 0: + default: break; /* Go onto next metacommand */ case 1: rfree(substack); diff --git a/engines/glk/agt/token.cpp b/engines/glk/agt/token.cpp index 1305056c8e..94404e5d27 100644 --- a/engines/glk/agt/token.cpp +++ b/engines/glk/agt/token.cpp @@ -598,6 +598,9 @@ static void obj_act(int op_, int obj) { case 3: /* lock and unlock */ if (tnoun(obj)) noun[obj - first_noun].locked = (op_ == 2); + break; + default: + break; } } |