Skip to content

Commit

Permalink
Fix a lot of warnings (for fussy compilers) and one always-true check
Browse files Browse the repository at this point in the history
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 641
  • Loading branch information
Russell Rice committed Sep 21, 2006
1 parent 16c1bc0 commit 6339c4c
Show file tree
Hide file tree
Showing 28 changed files with 349 additions and 336 deletions.
8 changes: 4 additions & 4 deletions src/am_map.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: am_map.c 162 2005-10-04 21:41:42Z fraggle $
// $Id: am_map.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
Expand Down Expand Up @@ -49,7 +49,7 @@
//
//-----------------------------------------------------------------------------

static const char rcsid[] = "$Id: am_map.c 162 2005-10-04 21:41:42Z fraggle $";
static const char rcsid[] = "$Id: am_map.c 641 2006-09-21 11:13:28Z rtc_marine $";

#include <stdio.h>

Expand Down Expand Up @@ -486,7 +486,7 @@ void AM_changeWindowLoc(void)
void AM_initVariables(void)
{
int pnum;
static event_t st_notify = { ev_keyup, AM_MSGENTERED };
static event_t st_notify = { ev_keyup, AM_MSGENTERED, 0, 0 };

automapactive = true;
fb = screens[0];
Expand Down Expand Up @@ -587,7 +587,7 @@ void AM_LevelInit(void)
//
void AM_Stop (void)
{
static event_t st_notify = { 0, ev_keyup, AM_MSGEXITED };
static event_t st_notify = { 0, ev_keyup, AM_MSGEXITED, 0 };

AM_unloadPics();
automapactive = false;
Expand Down
16 changes: 8 additions & 8 deletions src/d_main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: d_main.c 638 2006-09-20 19:04:02Z fraggle $
// $Id: d_main.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
Expand Down Expand Up @@ -184,7 +184,7 @@
//-----------------------------------------------------------------------------


static const char rcsid[] = "$Id: d_main.c 638 2006-09-20 19:04:02Z fraggle $";
static const char rcsid[] = "$Id: d_main.c 641 2006-09-21 11:13:28Z rtc_marine $";

#define BGCOLOR 7
#define FGCOLOR 8
Expand Down Expand Up @@ -788,7 +788,7 @@ struct

static char *SearchDirectoryForIWAD(char *dir)
{
int i;
size_t i;

for (i=0; i<sizeof(iwads) / sizeof(*iwads); ++i)
{
Expand Down Expand Up @@ -819,7 +819,7 @@ static char *SearchDirectoryForIWAD(char *dir)

static void IdentifyIWADByName(char *name)
{
int i;
size_t i;

gamemission = none;

Expand Down Expand Up @@ -952,7 +952,7 @@ static char *copyright_banners[] =

static char *GetGameName(char *gamename)
{
int i;
size_t i;
char *deh_sub;

for (i=0; i<sizeof(banners) / sizeof(*banners); ++i)
Expand Down Expand Up @@ -1266,7 +1266,7 @@ void PrintBanner(char *msg)

void PrintDehackedBanners(void)
{
int i;
size_t i;

for (i=0; i<sizeof(copyright_banners) / sizeof(char *); ++i)
{
Expand Down Expand Up @@ -1354,7 +1354,7 @@ static void SetConfigDir(void)

static void SetSaveGameDir(void)
{
int i;
size_t i;

if (!strcmp(configdir, ""))
{
Expand Down Expand Up @@ -1406,7 +1406,7 @@ static struct
{"Doom 1.9", "1.9", exe_doom_1_9},
{"Ultimate Doom", "ultimate", exe_ultimate},
{"Final Doom", "final", exe_final},
{NULL},
{ "\0", "\0", 0},
};

// Initialise the game version
Expand Down
4 changes: 2 additions & 2 deletions src/deh_cheat.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: deh_cheat.c 417 2006-03-11 21:34:19Z fraggle $
// $Id: deh_cheat.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 2005 Simon Howard
//
Expand Down Expand Up @@ -79,7 +79,7 @@ static deh_cheat_t allcheats[] =

static deh_cheat_t *FindCheatByName(char *name)
{
int i;
size_t i;

for (i=0; i<sizeof(allcheats) / sizeof(*allcheats); ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions src/deh_main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: deh_main.c 595 2006-09-02 19:02:11Z fraggle $
// $Id: deh_main.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 2005 Simon Howard
//
Expand Down Expand Up @@ -220,7 +220,7 @@ boolean DEH_ParseAssignment(char *line, char **variable_name, char **value)

static boolean CheckSignatures(deh_context_t *context)
{
int i;
size_t i;
char *line;

// Read the first line
Expand Down
4 changes: 2 additions & 2 deletions src/deh_misc.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: deh_misc.c 442 2006-03-25 20:08:58Z fraggle $
// $Id: deh_misc.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 2005 Simon Howard
//
Expand Down Expand Up @@ -208,7 +208,7 @@ static void DEH_MiscParseLine(deh_context_t *context, char *line, void *tag)
{
char *variable_name, *value;
int ivalue;
int i;
size_t i;

if (!DEH_ParseAssignment(line, &variable_name, &value))
{
Expand Down
8 changes: 4 additions & 4 deletions src/f_finale.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: f_finale.c 330 2006-01-23 00:07:56Z fraggle $
// $Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
Expand Down Expand Up @@ -48,7 +48,7 @@


static const char
rcsid[] = "$Id: f_finale.c 330 2006-01-23 00:07:56Z fraggle $";
rcsid[] = "$Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $";

#include <ctype.h>

Expand Down Expand Up @@ -132,7 +132,7 @@ void F_CastDrawer (void);
//
void F_StartFinale (void)
{
int i;
size_t i;

gameaction = ga_nothing;
gamestate = GS_FINALE;
Expand Down Expand Up @@ -189,7 +189,7 @@ boolean F_Responder (event_t *event)
//
void F_Ticker (void)
{
int i;
size_t i;

// check for skipping
if ( (gamemode == commercial)
Expand Down
6 changes: 3 additions & 3 deletions src/g_game.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: g_game.c 581 2006-08-31 18:13:04Z fraggle $
// $Id: g_game.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
Expand Down Expand Up @@ -134,7 +134,7 @@


static const char
rcsid[] = "$Id: g_game.c 581 2006-08-31 18:13:04Z fraggle $";
rcsid[] = "$Id: g_game.c 641 2006-09-21 11:13:28Z rtc_marine $";

#include <string.h>
#include <stdlib.h>
Expand Down Expand Up @@ -348,7 +348,7 @@ int vanilla_demo_limit = 1;

int G_CmdChecksum (ticcmd_t* cmd)
{
int i;
size_t i;
int sum = 0;

for (i=0 ; i< sizeof(*cmd)/4 - 1 ; i++)
Expand Down
4 changes: 2 additions & 2 deletions src/m_cheat.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: m_cheat.h 162 2005-10-04 21:41:42Z fraggle $
// $Id: m_cheat.h 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
Expand Down Expand Up @@ -37,7 +37,7 @@
// declaring a cheat

#define CHEAT(value, parameters) \
{ value, sizeof(value) - 1, parameters, 0, 0 }
{ value, sizeof(value) - 1, parameters, 0, 0, 0 }

#define MAX_CHEAT_LEN 15
#define MAX_CHEAT_PARAMS 5
Expand Down
16 changes: 8 additions & 8 deletions src/m_menu.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: m_menu.c 455 2006-03-30 19:08:37Z fraggle $
// $Id: m_menu.c 641 2006-09-21 11:13:28Z rtc_marine $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
Expand Down Expand Up @@ -78,7 +78,7 @@
//-----------------------------------------------------------------------------

static const char
rcsid[] = "$Id: m_menu.c 455 2006-03-30 19:08:37Z fraggle $";
rcsid[] = "$Id: m_menu.c 641 2006-09-21 11:13:28Z rtc_marine $";

#include <stdlib.h>
#include <ctype.h>
Expand Down Expand Up @@ -408,9 +408,9 @@ menuitem_t OptionsMenu[]=
{1,"M_MESSG", M_ChangeMessages,'m'},
{1,"M_DETAIL", M_ChangeDetail,'g'},
{2,"M_SCRNSZ", M_SizeDisplay,'s'},
{-1,"",0},
{-1,"",0,'\0'},
{2,"M_MSENS", M_ChangeSensitivity,'m'},
{-1,"",0},
{-1,"",0,'\0'},
{1,"M_SVOL", M_Sound,'s'}
};

Expand Down Expand Up @@ -484,9 +484,9 @@ enum
menuitem_t SoundMenu[]=
{
{2,"M_SFXVOL",M_SfxVol,'s'},
{-1,"",0},
{-1,"",0,'\0'},
{2,"M_MUSVOL",M_MusicVol,'m'},
{-1,"",0}
{-1,"",0,'\0'}
};

menu_t SoundDef =
Expand Down Expand Up @@ -1356,7 +1356,7 @@ void M_StopMessage(void)
//
int M_StringWidth(char* string)
{
int i;
size_t i;
int w = 0;
int c;

Expand All @@ -1379,7 +1379,7 @@ int M_StringWidth(char* string)
//
int M_StringHeight(char* string)
{
int i;
size_t i;
int h;
int height = SHORT(hu_font[0]->height);

Expand Down
Loading

0 comments on commit 6339c4c

Please sign in to comment.