summaryrefslogtreecommitdiff
path: root/src/heretic
diff options
context:
space:
mode:
authorSimon Howard2012-12-24 18:33:24 +0000
committerSimon Howard2012-12-24 18:33:24 +0000
commit9b6485b5cc5f005a547e8dd3e3d5a8b90838ed99 (patch)
tree3910167086dad2dd1e21b0ba87f0ed6dda5bc2eb /src/heretic
parent73fd9adc1e23f711d249d4adc2389711304bd027 (diff)
downloadchocolate-doom-9b6485b5cc5f005a547e8dd3e3d5a8b90838ed99.tar.gz
chocolate-doom-9b6485b5cc5f005a547e8dd3e3d5a8b90838ed99.tar.bz2
chocolate-doom-9b6485b5cc5f005a547e8dd3e3d5a8b90838ed99.zip
Fix compiler warnings by removing variables that are set but not used.
Subversion-branch: /branches/v2-branch Subversion-revision: 2555
Diffstat (limited to 'src/heretic')
-rw-r--r--src/heretic/am_map.c2
-rw-r--r--src/heretic/g_game.c11
-rw-r--r--src/heretic/mn_menu.c10
-rw-r--r--src/heretic/p_doors.c2
-rw-r--r--src/heretic/p_enemy.c4
-rw-r--r--src/heretic/p_spec.c5
-rw-r--r--src/heretic/r_data.c4
7 files changed, 5 insertions, 33 deletions
diff --git a/src/heretic/am_map.c b/src/heretic/am_map.c
index aae30cc9..2230c69e 100644
--- a/src/heretic/am_map.c
+++ b/src/heretic/am_map.c
@@ -506,7 +506,6 @@ boolean AM_Responder(event_t * ev)
{
int rc;
int key;
- static int cheatstate = 0;
static int bigstate = 0;
key = ev->data1;
@@ -611,7 +610,6 @@ boolean AM_Responder(event_t * ev)
*/
else
{
- cheatstate = 0;
rc = false;
}
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c
index d3331b6e..961314ef 100644
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -1049,14 +1049,8 @@ also see P_SpawnPlayer in P_Things
void G_InitPlayer(int player)
{
- player_t *p;
-
-// set up the saved info
- p = &players[player];
-
-// clear everything else to defaults
+ // clear everything else to defaults
G_PlayerReborn(player);
-
}
@@ -1423,14 +1417,13 @@ void G_LoadGame(char *name)
void G_DoLoadGame(void)
{
- int length;
int i;
int a, b, c;
char vcheck[VERSIONSIZE];
gameaction = ga_nothing;
- length = M_ReadFile(savename, &savebuffer);
+ M_ReadFile(savename, &savebuffer);
free(savename);
savename = NULL;
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index 94713080..4958d9be 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -642,7 +642,6 @@ static void DrawSaveMenu(void)
void MN_LoadSlotText(void)
{
FILE *fp;
- int count;
int i;
char *filename;
@@ -658,7 +657,7 @@ void MN_LoadSlotText(void)
SlotStatus[i] = 0;
continue;
}
- count = fread(&SlotText[i], SLOTTEXTLEN, 1, fp);
+ fread(&SlotText[i], SLOTTEXTLEN, 1, fp);
fclose(fp);
SlotStatus[i] = 1;
}
@@ -1040,7 +1039,6 @@ boolean MN_Responder(event_t * event)
int i;
MenuItem_t *item;
extern boolean automapactive;
- static boolean shiftdown;
extern void D_StartTitle(void);
extern void G_CheckDemoStatus(void);
char *textBuffer;
@@ -1081,11 +1079,7 @@ boolean MN_Responder(event_t * event)
return true;
}
- if (event->data1 == KEY_RSHIFT)
- {
- shiftdown = (event->type == ev_keydown);
- }
- if (event->type != ev_keydown)
+ if (event->data1 != KEY_RSHIFT && event->type != ev_keydown)
{
return (false);
}
diff --git a/src/heretic/p_doors.c b/src/heretic/p_doors.c
index 56e37119..cd5e4e87 100644
--- a/src/heretic/p_doors.c
+++ b/src/heretic/p_doors.c
@@ -213,7 +213,6 @@ int EV_DoDoor(line_t * line, vldoor_e type, fixed_t speed)
void EV_VerticalDoor(line_t * line, mobj_t * thing)
{
player_t *player;
- int secnum;
sector_t *sec;
vldoor_t *door;
int side;
@@ -268,7 +267,6 @@ void EV_VerticalDoor(line_t * line, mobj_t * thing)
// if the sector has an active thinker, use it
sec = sides[line->sidenum[side ^ 1]].sector;
- secnum = sec - sectors;
if (sec->specialdata)
{
door = sec->specialdata;
diff --git a/src/heretic/p_enemy.c b/src/heretic/p_enemy.c
index 55e0d829..d569c78e 100644
--- a/src/heretic/p_enemy.c
+++ b/src/heretic/p_enemy.c
@@ -526,7 +526,6 @@ boolean P_LookForPlayers(mobj_t * actor, boolean allaround)
int c;
int stop;
player_t *player;
- sector_t *sector;
angle_t an;
fixed_t dist;
@@ -534,7 +533,6 @@ boolean P_LookForPlayers(mobj_t * actor, boolean allaround)
{ // Single player game and player is dead, look for monsters
return (P_LookForMonsters(actor));
}
- sector = actor->subsector->sector;
c = 0;
stop = (actor->lastlook - 1) & 3;
for (;; actor->lastlook = (actor->lastlook + 1) & 3)
@@ -2272,7 +2270,6 @@ void A_MakePod(mobj_t * actor)
mobj_t *mo;
fixed_t x;
fixed_t y;
- fixed_t z;
if (actor->special1.i == MAX_GEN_PODS)
{ // Too many generated pods
@@ -2280,7 +2277,6 @@ void A_MakePod(mobj_t * actor)
}
x = actor->x;
y = actor->y;
- z = actor->z;
mo = P_SpawnMobj(x, y, ONFLOORZ, MT_POD);
if (P_CheckPosition(mo, x, y) == false)
{ // Didn't fit
diff --git a/src/heretic/p_spec.c b/src/heretic/p_spec.c
index 20fb950b..923d1f32 100644
--- a/src/heretic/p_spec.c
+++ b/src/heretic/p_spec.c
@@ -1133,11 +1133,6 @@ void P_SpawnSpecials(void)
{
sector_t *sector;
int i;
- int episode;
-
- episode = 1;
- if (W_CheckNumForName(DEH_String("texture2")) >= 0)
- episode = 2;
//
// Init special SECTORs
diff --git a/src/heretic/r_data.c b/src/heretic/r_data.c
index 5bb79aa4..a2f3f10e 100644
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -106,9 +106,7 @@ void R_DrawColumnInCache(column_t * patch, byte * cache, int originy,
int cacheheight)
{
int count, position;
- byte *source, *dest;
-
- dest = (byte *) cache + 3;
+ byte *source;
while (patch->topdelta != 0xff)
{