From c9d4b7977a995f111945b21f4115c071b5f0dd72 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sun, 1 Aug 2010 16:39:03 +0000 Subject: doom: fix types mismatch spotted by gcc 4.5.1 - some variables were defined as const but declared without const - remove double declaration of mapnames* (already in .h) - forceOldBsp is boolean, not int git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27660 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/d_deh.h | 2 +- apps/plugins/doom/g_game.c | 4 ++-- apps/plugins/doom/hu_stuff.c | 12 ------------ apps/plugins/doom/hu_stuff.h | 8 ++++---- 4 files changed, 7 insertions(+), 19 deletions(-) (limited to 'apps/plugins/doom') diff --git a/apps/plugins/doom/d_deh.h b/apps/plugins/doom/d_deh.h index 0844c38be1..0d65260b18 100644 --- a/apps/plugins/doom/d_deh.h +++ b/apps/plugins/doom/d_deh.h @@ -86,7 +86,7 @@ extern const char *s_QLPROMPT; // = QLPROMPT; "you can't start a new game\n"\ "while in a network game.\n\n"PRESSKEY */ -extern char *s_NEWGAME; // = NEWGAME; +extern const char *s_NEWGAME; // = NEWGAME; // CPhipps - message given when asked if to restart the level extern char *s_RESTARTLEVEL; diff --git a/apps/plugins/doom/g_game.c b/apps/plugins/doom/g_game.c index d4445254f0..f970b66b5a 100644 --- a/apps/plugins/doom/g_game.c +++ b/apps/plugins/doom/g_game.c @@ -844,7 +844,7 @@ void G_Ticker (void) if ((netgame || demoplayback) && cmd->forwardmove > TURBOTHRESHOLD && !(gametic&31) && ((gametic>>5)&3) == i ) { - extern char *player_names[]; + extern const char *player_names[]; /* cph - don't use sprintf, use doom_printf */ doom_printf ("%s is turbo!", player_names[i]); } @@ -2241,7 +2241,7 @@ void G_RecordDemo (const char* name) // byte(s) should still be skipped over or padded with 0's. // Lee Killough 3/1/98 -extern int forceOldBsp; +extern boolean forceOldBsp; byte *G_WriteOptions(byte *demo_p) { diff --git a/apps/plugins/doom/hu_stuff.c b/apps/plugins/doom/hu_stuff.c index 5361435fd5..639c963f72 100644 --- a/apps/plugins/doom/hu_stuff.c +++ b/apps/plugins/doom/hu_stuff.c @@ -227,18 +227,6 @@ extern int armor_red; extern int armor_yellow; extern int armor_green; -// -// Builtin map names. -// The actual names can be found in DStrings.h. -// -// Ty 03/27/98 - externalized map name arrays - now in d_deh.c -// and converted to arrays of pointers to char * -// See modified HUTITLEx macros -extern char **mapnames[]; -extern char **mapnames2[]; -extern char **mapnamesp[]; -extern char **mapnamest[]; - // key tables // jff 5/10/98 french support removed, // as it was not being used and couldn't be easily tested diff --git a/apps/plugins/doom/hu_stuff.h b/apps/plugins/doom/hu_stuff.h index c0e927d4bb..8946e06220 100644 --- a/apps/plugins/doom/hu_stuff.h +++ b/apps/plugins/doom/hu_stuff.h @@ -84,9 +84,9 @@ extern int hud_displayed; /* hud is displayed */ extern int hud_active; /* hud mode 0=off, 1=small, 2=full */ extern int hud_nosecrets; /* status does not list secrets/items/kills */ -extern char **mapnames[]; -extern char **mapnames2[]; -extern char **mapnamesp[]; -extern char **mapnamest[]; +extern const char ** const mapnames[]; +extern const char ** const mapnames2[]; +extern const char ** const mapnamesp[]; +extern const char ** const mapnamest[]; #endif -- cgit v1.2.3