shithub: hexen

Download patch

ref: dc803493f4a4f35e7713a9ee52b635558add5b9d
parent: 537c864df956af56f4d1997c43871d9186e9795c
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jan 22 19:21:44 EST 2023

clean up compiler warnings

--- a/a_action.c
+++ b/a_action.c
@@ -1139,6 +1139,7 @@
 	mobj_t *mo;
 	int i;
 
+	mo = nil;
 	for (i = 0; i < 10; i++)
 	{
 		mo = P_SpawnMobj(actor->x+((P_Random()-128)<<12), 
--- a/am_map.c
+++ b/am_map.c
@@ -598,6 +598,7 @@
 
 static void AM_clearFB(int color)
 {
+	USED(color);
 #ifdef RENDER3D
 	float scaler;
 	int lump;
@@ -1350,6 +1351,7 @@
 	int i;
 	mobj_t *t;
 
+	USED(colorrange);
 	for (i = 0; i < numsectors; i++)
 	{
 		t = sectors[i].thinglist;
--- a/d_net.c
+++ b/d_net.c
@@ -542,7 +542,7 @@
 
 	do
 	{
-		i = 0;
+		//i = 0;
 
 		CheckAbort();
 		while (HGetPacket())
--- a/f_finale.c
+++ b/f_finale.c
@@ -111,6 +111,7 @@
 
 boolean F_Responder(event_t *event)
 {
+	USED(event);
 	return false;
 }
 
--- a/g_game.c
+++ b/g_game.c
@@ -225,6 +225,7 @@
 	if (alwaysrun && !demoplayback && !demorecording)
 		speed = !speed;
 	forward = side = look = arti = flyheight = 0;
+	USED(arti);
 
 //
 // use two stage accelerative turning on the keyboard and joystick
@@ -1320,6 +1321,7 @@
 {
 	int realMap;
 
+	USED(skill);
 	G_StartNewInit();
 	realMap = P_TranslateMap(1);
 	if (realMap == -1)
@@ -1725,6 +1727,7 @@
 {
 	int		i;
 
+	USED(numplayers);
 	G_InitNew (skill, episode, map);
 	usergame = false;
 	snprintf (demoname, sizeof(demoname), "%s%s.lmp", basePath, name);
--- a/h2_main.c
+++ b/h2_main.c
@@ -411,6 +411,7 @@
 
 static void ExecOptionSKILL(const char **args, int tag)
 {
+	USED(tag);
 	startskill = args[1][0] - '1';
 	autostart = true;
 }
@@ -425,6 +426,7 @@
 {
 	int p;
 
+	USED(tag); USED(args);
 	p = M_CheckParm("-file");
 	while (++p != myargc && myargv[p][0] != '-')
 	{
@@ -443,6 +445,7 @@
 {
 	char file[256];
 
+	USED(tag);
 	snprintf(file, sizeof(file), "%s.lmp", args[1]);
 	AddWADFile(file);
 	ST_Message("Playing demo %s.lmp.\n", args[1]);
@@ -456,6 +459,7 @@
 
 static void ExecOptionSCRIPTS(const char **args, int tag)
 {
+	USED(tag);
 	sc_FileScripts = true;
 	sc_ScriptsDir = args[1];
 }
@@ -469,6 +473,8 @@
 static void ExecOptionDEVMAPS(const char **args, int tag)
 {
 	char *ptr;
+
+	USED(tag);
 	DevMaps = true;
 	ST_Message("Map development mode enabled:\n");
 	ST_Message("[config    ] = %s\n", args[1]);
@@ -539,6 +545,7 @@
 {
 	int size;
 
+	USED(tag);
 	size = (int) superatol(args[1]);
 	if (size < MINIMUM_HEAP_SIZE)
 		size = MINIMUM_HEAP_SIZE;
--- a/i_cdmus.c
+++ b/i_cdmus.c
@@ -84,7 +84,7 @@
 //
 //==========================================================================
 
-int I_CDMusPlay(int track)
+int I_CDMusPlay(int)
 {
 	return 0;
 }
@@ -129,7 +129,7 @@
 //
 //==========================================================================
 
-int I_CDMusSetVolume(int volume)
+int I_CDMusSetVolume(int)
 {
 	return 0;
 }
--- a/i_system.c
+++ b/i_system.c
@@ -5,6 +5,7 @@
 
 #include "i_system.h"
 #include "i_video.h"
+#include "i_sound.h"
 
 //#include "g_game.h"
 //#include "m_misc.h"
@@ -34,6 +35,8 @@
 {
 	return &emptycmd;
 }
+
+extern void G_CheckDemoStatus(void);
 
 void I_Quit (void)
 {
--- a/in_lude.c
+++ b/in_lude.c
@@ -131,7 +131,7 @@
 //
 //========================================================================
 
-void WaitStop(void)
+static void WaitStop(void)
 {
 	if (!--cnt)
 	{
--- a/m_misc.c
+++ b/m_misc.c
@@ -250,7 +250,6 @@
 static int __ReadFile(char const *name, void **buffer, int mallocType)
 {
 	int handle, count, length;
-	struct stat fileinfo;
 	void *buf;
 	Dir *d;
 
--- a/mn_menu.c
+++ b/mn_menu.c
@@ -1183,6 +1183,7 @@
 
 static void SCQuitGame(int option)
 {
+	USED(option);
 	MenuActive = false;
 	askforquit = true;
 	typeofask = 1; //quit game
@@ -1201,6 +1202,7 @@
 
 static void SCEndGame(int option)
 {
+	USED(option);
 	if (demoplayback)
 	{
 		return;
@@ -1225,6 +1227,7 @@
 
 static void SCMessages(int option)
 {
+	USED(option);
 	if (messageson)
 	{
 		messageson = 0;
@@ -1519,6 +1522,7 @@
 
 static void SCInfo(int option)
 {
+	USED(option);
 	InfoType = 1;
 	S_StartSound(NULL, SFX_DOOR_LIGHT_CLOSE);
 	if (!netgame && !demoplayback)
@@ -1535,6 +1539,7 @@
 
 static void SCSetKey(int option)
 {
+	USED(option);
 	askforkey = true;
 	keyaskedfor = option;
 	if (!netgame && !demoplayback)
@@ -1562,6 +1567,7 @@
 
 static void SCAlwaysRun(int option)
 {
+	USED(option);
 	if (alwaysrun)
 		alwaysrun = 0;
 	else	alwaysrun = 1;
@@ -1569,6 +1575,7 @@
 
 static void SCCDAudio(int option)
 {
+	USED(option);
 	if (cdaudio)
 	{
 		cdaudio = 0;
@@ -2140,7 +2147,6 @@
 		}
 		return true;
 	}
-	return false;
 }
 
 //---------------------------------------------------------------------------
@@ -2197,7 +2203,7 @@
 //
 //---------------------------------------------------------------------------
 
-void MN_DrawInfo(void)
+static void MN_DrawInfo(void)
 {
 	V_SetPaletteBase();
 	V_DrawRawScreen((BYTE_REF) WR_CacheLumpNum(W_GetNumForName("TITLE")+InfoType, PU_CACHE));
--- a/p_acs.c
+++ b/p_acs.c
@@ -559,6 +559,7 @@
 {
 	int infoIndex;
 
+	USED(map);
 	infoIndex = GetACSIndex(number);
 	if (infoIndex == -1)
 	{ // Script not found
@@ -583,6 +584,7 @@
 {
 	int infoIndex;
 
+	USED(map);
 	infoIndex = GetACSIndex(number);
 	if (infoIndex == -1)
 	{ // Script not found
--- a/p_ceilng.c
+++ b/p_ceilng.c
@@ -97,7 +97,7 @@
 //
 //==================================================================
 
-int EV_DoCeiling (line_t *line, byte *arg, ceiling_e type)
+int EV_DoCeiling (line_t*, byte *arg, ceiling_e type)
 {
 	int		secnum, rtn;
 	sector_t	*sec;
@@ -279,7 +279,7 @@
 //
 //==================================================================
 
-int EV_CeilingCrushStop(line_t *line, byte *args)
+int EV_CeilingCrushStop(line_t*, byte *args)
 {
 	int		i;
 	int		rtn;
--- a/p_doors.c
+++ b/p_doors.c
@@ -131,7 +131,7 @@
 //
 //----------------------------------------------------------------------------
 
-int EV_DoDoor(line_t *line, byte *args, vldoor_e type)
+int EV_DoDoor(line_t*, byte *args, vldoor_e type)
 {
 	int secnum;
 	int retcode;
@@ -191,7 +191,7 @@
 //
 //==================================================================
 
-boolean EV_VerticalDoor(line_t *line, mobj_t *thing)
+boolean EV_VerticalDoor(line_t *line, mobj_t*)
 {
 	sector_t	*sec;
 	vldoor_t	*door;
--- a/p_enemy.c
+++ b/p_enemy.c
@@ -575,7 +575,6 @@
 		actor->target = player->mo;
 		return true;
 	}
-	return false;
 }
 
 /*
@@ -1133,7 +1132,7 @@
 
 void A_MinotaurLook(mobj_t *actor)
 {
-	mobj_t *mo = NULL;
+	mobj_t *mo;
 	player_t *player;
 	thinker_t *think;
 	fixed_t dist;
--- a/p_floor.c
+++ b/p_floor.c
@@ -153,8 +153,10 @@
 			else
 			{
 				lastpos = sector->ceilingheight;
+				USED(lastpos);
 				sector->ceilingheight += speed;
 				flag = P_ChangeSector(sector, crush);
+				USED(flag);
 				#if 0
 				if (flag == true)
 				{
@@ -269,7 +271,7 @@
 //
 //==================================================================
 
-int EV_DoFloor(line_t *line, byte *args, floor_e floortype)
+int EV_DoFloor(line_t*, byte *args, floor_e floortype)
 {
 	int		secnum;
 	int		rtn;
@@ -587,7 +589,7 @@
 // up or down.
 //==================================================================
 
-int EV_BuildStairs(line_t *line, byte *args, int direction,
+int EV_BuildStairs(line_t*, byte *args, int direction,
 					stairs_e stairsType)
 {
 	int		secnum;
@@ -672,7 +674,7 @@
 //
 //=========================================================================
 
-int EV_BuildPillar(line_t *line, byte *args, boolean crush)
+int EV_BuildPillar(line_t*, byte *args, boolean crush)
 {
 	int secnum;
 	sector_t *sec;
@@ -739,7 +741,7 @@
 //
 //=========================================================================
 
-int EV_OpenPillar(line_t *line, byte *args)
+int EV_OpenPillar(line_t*, byte *args)
 {
 	int secnum;
 	sector_t *sec;
@@ -805,7 +807,7 @@
 //
 //=========================================================================
 
-int EV_FloorCrushStop(line_t *line, byte *args)
+int EV_FloorCrushStop(line_t*, byte*)
 {
 	thinker_t *think;
 	floormove_t *floor;
--- a/p_inter.c
+++ b/p_inter.c
@@ -817,7 +817,7 @@
 //
 //---------------------------------------------------------------------------
 
-boolean P_GiveArtifact(player_t *player, artitype_t arti, mobj_t *mo)
+boolean P_GiveArtifact(player_t *player, artitype_t arti, mobj_t*)
 {
 	int i;
 	int j;
--- a/p_lights.c
+++ b/p_lights.c
@@ -98,7 +98,7 @@
 //
 //============================================================================
 
-boolean EV_SpawnLight(line_t *line, byte *arg, lighttype_t type)
+boolean EV_SpawnLight(line_t*, byte *arg, lighttype_t type)
 {
 	light_t *light;
 	sector_t *sec;
@@ -115,6 +115,7 @@
 	secNum = -1;
 	rtn = false;
 	think = false;
+	USED(think);
 	while ((secNum = P_FindSectorFromTag(arg[0], secNum)) >= 0)
 	{
 		think = false;
--- a/p_map.c
+++ b/p_map.c
@@ -1566,6 +1566,7 @@
 ////		I_Error ("SlideLine: ang>ANG180");
 
 	lineangle >>= ANGLETOFINESHIFT;
+	USED(lineangle);
 	deltaangle >>= ANGLETOFINESHIFT;
 
 	movelen = P_AproxDistance(mo->momx, mo->momy);
--- a/p_mobj.c
+++ b/p_mobj.c
@@ -673,7 +673,8 @@
 	{
 		damage = ((mom - (23*FRACUNIT) )*6)>>FRACBITS;
 	}
-	damage = 10000;	// always kill 'em
+	USED(damage);
+	damage = 10000;	// always kill 'em <- sure I guess why not
 	P_DamageMobj(mo, NULL, NULL, damage);
 }
 
@@ -1010,7 +1011,7 @@
 //
 //===========================================================================
 
-static void PlayerLandedOnThing(mobj_t *mo, mobj_t *onmobj)
+static void PlayerLandedOnThing(mobj_t *mo, mobj_t*)
 {
 	mo->player->deltaviewheight = mo->momz>>3;
 	if (mo->momz < -23*FRACUNIT)
--- a/p_plats.c
+++ b/p_plats.c
@@ -96,7 +96,7 @@
 //
 //==================================================================
 
-int EV_DoPlat(line_t *line, byte *args, plattype_e type, int amount)
+int EV_DoPlat(line_t*, byte *args, plattype_e type, int amount)
 {
 	plat_t		*plat;
 	int		secnum;
@@ -105,6 +105,7 @@
 
 	secnum = -1;
 	rtn = 0;
+	USED(amount);
 
 	/*
 	//
@@ -209,7 +210,7 @@
 }
 #endif
 
-void EV_StopPlat(line_t *line, byte *args)
+void EV_StopPlat(line_t*, byte *args)
 {
 	int		i;
 
--- a/p_pspr.c
+++ b/p_pspr.c
@@ -581,7 +581,7 @@
 //
 //---------------------------------------------------------------------------
 
-void A_ReFire(player_t *player, pspdef_t *psp)
+void A_ReFire(player_t *player, pspdef_t*)
 {
 	if ((player->cmd.buttons&BT_ATTACK)
 		&& player->pendingweapon == WP_NOCHANGE && player->health)
@@ -732,7 +732,7 @@
 //
 //============================================================================
 
-void A_SnoutAttack(player_t *player, pspdef_t *psp)
+void A_SnoutAttack(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	int damage;
@@ -765,7 +765,7 @@
 
 #define HAMMER_RANGE	(MELEERANGE+MELEERANGE/2)
 
-void A_FHammerAttack(player_t *player, pspdef_t *psp)
+void A_FHammerAttack(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	mobj_t *pmo = player->mo;
@@ -834,7 +834,7 @@
 //
 //============================================================================
 
-void A_FHammerThrow(player_t *player, pspdef_t *psp)
+void A_FHammerThrow(player_t *player, pspdef_t*)
 {
 	mobj_t *mo;
 
@@ -856,7 +856,7 @@
 //
 //============================================================================
 
-void A_FSwordAttack(player_t *player, pspdef_t *psp)
+void A_FSwordAttack(player_t *player, pspdef_t*)
 {
 	mobj_t *pmo;
 
@@ -914,7 +914,7 @@
 //
 //============================================================================
 
-void A_MWandAttack(player_t *player, pspdef_t *psp)
+void A_MWandAttack(player_t *player, pspdef_t*)
 {
 	mobj_t *mo;
 
@@ -1110,7 +1110,7 @@
 //
 //============================================================================
 
-void A_MLightningAttack(player_t *player, pspdef_t *psp)
+void A_MLightningAttack(player_t *player, pspdef_t*)
 {
 	A_MLightningAttack2(player->mo);
 	player->mana[MANA_2] -= WeaponManaUse[player->playerclass][player->readyweapon];
@@ -1203,7 +1203,7 @@
 //
 //============================================================================
 
-void A_MStaffAttack(player_t *player, pspdef_t *psp)
+void A_MStaffAttack(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	mobj_t *pmo;
@@ -1332,7 +1332,7 @@
 //
 //============================================================================
 
-void A_FPunchAttack(player_t *player, pspdef_t *psp)
+void A_FPunchAttack(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	int damage;
@@ -1410,7 +1410,7 @@
 
 #define AXERANGE	2.25*MELEERANGE
 
-void A_FAxeAttack(player_t *player, pspdef_t *psp)
+void A_FAxeAttack(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	mobj_t *pmo = player->mo;
@@ -1489,7 +1489,7 @@
 //
 //===========================================================================
 
-void A_CMaceAttack(player_t *player, pspdef_t *psp)
+void A_CMaceAttack(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	int damage;
@@ -1538,7 +1538,7 @@
 //
 //============================================================================
 
-void A_CStaffCheck(player_t *player, pspdef_t *psp)
+void A_CStaffCheck(player_t *player, pspdef_t*)
 {
 	mobj_t *pmo;
 	int damage;
@@ -1598,7 +1598,7 @@
 //
 //============================================================================
 
-void A_CStaffAttack(player_t *player, pspdef_t *psp)
+void A_CStaffAttack(player_t *player, pspdef_t*)
 {
 	mobj_t *mo;
 	mobj_t *pmo;
@@ -1647,7 +1647,7 @@
 //
 //============================================================================
 
-void A_CStaffInitBlink(player_t *player, pspdef_t *psp)
+void A_CStaffInitBlink(player_t *player, pspdef_t*)
 {
 	player->mo->special1 = (P_Random()>>1) + 20;
 }
@@ -1658,7 +1658,7 @@
 //
 //============================================================================
 
-void A_CStaffCheckBlink(player_t *player, pspdef_t *psp)
+void A_CStaffCheckBlink(player_t *player, pspdef_t*)
 {
 	if (!--player->mo->special1)
 	{
@@ -1676,7 +1676,7 @@
 #define FLAMESPEED	(0.45*FRACUNIT)
 #define CFLAMERANGE	(12*64*FRACUNIT)
 
-void A_CFlameAttack(player_t *player, pspdef_t *psp)
+void A_CFlameAttack(player_t *player, pspdef_t*)
 {
 	mobj_t *mo;
 
@@ -1943,7 +1943,7 @@
 //
 //============================================================================
 
-void A_CHolyAttack(player_t *player, pspdef_t *psp)
+void A_CHolyAttack(player_t *player, pspdef_t*)
 {
 	player->mana[MANA_1] -= WeaponManaUse[player->playerclass][player->readyweapon];
 	player->mana[MANA_2] -= WeaponManaUse[player->playerclass][player->readyweapon];
@@ -2265,7 +2265,7 @@
 #define SHARDSPAWN_UP		4
 #define SHARDSPAWN_DOWN		8
 
-void A_FireConePL1(player_t *player, pspdef_t *psp)
+void A_FireConePL1(player_t *player, pspdef_t*)
 {
 	angle_t angle;
 	int damage;
@@ -2283,7 +2283,7 @@
 	{
 		angle = pmo->angle + i*(ANG45/16);
 		slope = P_AimLineAttack(pmo, angle, MELEERANGE);
-		(void) slope; /* variable set but not used */
+		USED(slope); /* variable set but not used */
 		if (linetarget)
 		{
 			pmo->flags2 |= MF2_ICEDAMAGE;
@@ -2409,7 +2409,7 @@
 }
 */
 
-void A_Light0(player_t *player, pspdef_t *psp)
+void A_Light0(player_t *player, pspdef_t*)
 {
 	player->extralight = 0;
 }
@@ -2479,6 +2479,7 @@
 				}
 			}
 		}
+		USED(state);
 	}
 	player->psprites[ps_flash].sx = player->psprites[ps_weapon].sx;
 	player->psprites[ps_flash].sy = player->psprites[ps_weapon].sy;
--- a/p_setup.c
+++ b/p_setup.c
@@ -996,7 +996,7 @@
 =================
 */
 
-void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
+void P_SetupLevel(int episode, int map, int playermask, skill_t)
 {
 	int		i;
 	int		parm;
@@ -1005,6 +1005,8 @@
 	int		lumpnum;
 	mobj_t		*mobj;
 
+	USED(playermask);
+	USED(episode);
 	for (i = 0; i < MAXPLAYERS; i++)
 	{
 		players[i].killcount = players[i].secretcount = players[i].itemcount = 0;
--- a/p_spec.c
+++ b/p_spec.c
@@ -451,6 +451,7 @@
 	int i;
 	artitype_t type, arti;
 
+	USED(args);
 	if (!mo)
 		return false;
 	player = mo->player;
@@ -868,7 +869,9 @@
 			return false;		// never open secret doors
 	}
 	repeat = line->flags & ML_REPEAT_SPECIAL;
+	USED(repeat);
 	buttonSuccess = false;
+	USED(buttonSuccess);
 
 	buttonSuccess = P_ExecuteLineSpecial(line->special, &line->arg1, line, side, mo);
 	if (!repeat && buttonSuccess)
--- a/po_man.c
+++ b/po_man.c
@@ -108,7 +108,7 @@
 //
 //==========================================================================
 
-boolean EV_RotatePoly(line_t *line, byte *args, int direction, boolean overRide)
+boolean EV_RotatePoly(line_t*, byte *args, int direction, boolean overRide)
 {
 	int mirror;
 	int polyNum;
@@ -234,7 +234,7 @@
 //
 //==========================================================================
 
-boolean EV_MovePoly(line_t *line, byte *args, boolean timesEight, boolean overRide)
+boolean EV_MovePoly(line_t*, byte *args, boolean timesEight, boolean overRide)
 {
 	int mirror;
 	int polyNum;
@@ -436,7 +436,7 @@
 //
 //==========================================================================
 
-boolean EV_OpenPolyDoor(line_t *line, byte *args, podoortype_t type)
+boolean EV_OpenPolyDoor(line_t*, byte *args, podoortype_t type)
 {
 	int mirror;
 	int polyNum;
--- a/r_data.c
+++ b/r_data.c
@@ -118,6 +118,7 @@
 // composite the columns together
 //
 	patch = texture->patches;
+	USED(patch);
 
 	for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
 	{
@@ -180,6 +181,7 @@
 	patchcount = (byte *)malloc (texture->width);
 	memset (patchcount, 0, texture->width);
 	patch = texture->patches;
+	USED(patch);
 
 	for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
 	{
--- a/r_main.c
+++ b/r_main.c
@@ -259,8 +259,6 @@
 				return ANG270 - 1 - tantoangle[SlopeDiv(x,y)];	// octant 5
 		}
 	}
-
-	return 0;
 }
 
 
@@ -478,6 +476,7 @@
 	{
 		t = FixedMul (finetangent[i], focallength);
 		t = centerx - t;
+		USED(t);
 		if (viewangletox[i] == -1)
 			viewangletox[i] = 0;
 		else if (viewangletox[i] == viewwidth + 1)
--- a/r_things.c
+++ b/r_things.c
@@ -380,6 +380,8 @@
 	patch_t		*patch;
 	fixed_t		baseclip;
 
+	USED(x1);
+	USED(x2);
 	patch = (patch_t *) W_CacheLumpNum(vis->patch + firstspritelump, PU_CACHE);
 
 	dc_colormap = vis->colormap;
@@ -486,6 +488,8 @@
 	float		sinrv, cosrv, thangle;	// rv = real value
 #endif
 
+	USED(x1);
+	USED(x2);
 	if (thing->flags2 & MF2_DONTDRAW)
 	{ // Never make a vissprite when MF2_DONTDRAW is flagged.
 		return;
--- a/sb_bar.c
+++ b/sb_bar.c
@@ -909,6 +909,7 @@
 		snprintf(text, sizeof(text), "%d", c->distance);
 		MN_DrTextA(text, xPos[x++], y);
 	}
+	USED(x);
 	UpdateState |= I_FULLSCRN;
 	BorderNeedRefresh = true;
 }
@@ -1155,7 +1156,6 @@
 		CPlayer = &players[consoleplayer];
 		if (CPlayer->poisoncount)
 		{
-			palette = 0;
 			palette = (CPlayer->poisoncount + 7)>>3;
 			if (palette >= NUMPOISONPALS)
 			{
@@ -1207,7 +1207,7 @@
 //
 //==========================================================================
 
-void DrawCommonBar(void)
+static void DrawCommonBar(void)
 {
 	int healthPos;
 
@@ -1243,7 +1243,7 @@
 //
 //==========================================================================
 
-void DrawMainBar(void)
+static void DrawMainBar(void)
 {
 	PATCH_REF manaPatch1		= INVALID_PATCH;
 	PATCH_REF manaPatch2		= INVALID_PATCH;
@@ -1251,6 +1251,7 @@
 	PATCH_REF manaVialPatch2	= INVALID_PATCH;
 	int				i, temp;
 
+	USED(manaVialPatch2);
 	// Ready artifact
 	if (ArtifactFlash)
 	{
@@ -1484,7 +1485,7 @@
 //
 //==========================================================================
 
-void DrawInventoryBar(void)
+static void DrawInventoryBar(void)
 {
 	int i;
 	int x;
@@ -1522,7 +1523,7 @@
 //
 //==========================================================================
 
-void DrawKeyBar(void)
+static void DrawKeyBar(void)
 {
 	int i;
 	int xPosition;
@@ -1622,7 +1623,7 @@
 //
 //==========================================================================
 
-void DrawFullScreenStuff(void)
+static void DrawFullScreenStuff(void)
 {
 	int i;
 	int x;
@@ -1854,6 +1855,7 @@
 
 static void CheatGodFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	player->cheats ^= CF_GODMODE;
 	if (player->cheats & CF_GODMODE)
 	{
@@ -1868,6 +1870,7 @@
 
 static void CheatNoClipFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	player->cheats ^= CF_NOCLIP;
 	if (player->cheats & CF_NOCLIP)
 	{
@@ -1884,6 +1887,7 @@
 	int i;
 	//extern boolean *WeaponInShareware;
 
+	USED(cheat);
 	for (i = 0; i < NUMARMOR; i++)
 	{
 		player->armorpoints[i] = ArmorIncrement[player->playerclass][i];
@@ -1901,6 +1905,7 @@
 
 static void CheatHealthFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	if (player->morphTics)
 	{
 		player->health = player->mo->health = MAXMORPHHEALTH;
@@ -1914,6 +1919,7 @@
 
 static void CheatKeysFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	player->keys = 2047;
 	P_SetMessage(player, TXT_CHEATKEYS, true);
 }
@@ -1920,6 +1926,7 @@
 
 static void CheatSoundFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	DebugSound = !DebugSound;
 	if (DebugSound)
 	{
@@ -1935,6 +1942,7 @@
 {
 	extern int DisplayTicker;
 
+	USED(cheat);
 	DisplayTicker = !DisplayTicker;
 	if (DisplayTicker)
 	{
@@ -1951,6 +1959,7 @@
 	int i;
 	int j;
 
+	USED(cheat);
 	for (i = arti_none + 1; i < arti_firstpuzzitem; i++)
 	{
 		for (j = 0; j < 25; j++)
@@ -1965,6 +1974,7 @@
 {
 	int i;
 
+	USED(cheat);
 	for (i = arti_firstpuzzitem; i < NUMARTIFACTS; i++)
 	{
 		P_GiveArtifact(player, i, NULL);
@@ -1974,6 +1984,7 @@
 
 static void CheatInitFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	G_DeferedInitNew(gameskill, gameepisode, gamemap);
 	P_SetMessage(player, TXT_CHEATWARP, true);
 }
@@ -2034,6 +2045,7 @@
 
 static void CheatPigFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	if (player->morphTics)
 	{
 		P_UndoPlayerMorph(player);
@@ -2050,6 +2062,7 @@
 	int count;
 	char buffer[80];
 
+	USED(cheat);
 	count = P_Massacre();
 	snprintf(buffer, sizeof(buffer), "%d MONSTERS KILLED\n", count);
 	P_SetMessage(player, buffer, true);
@@ -2058,6 +2071,8 @@
 static void CheatIDKFAFunc(player_t *player, Cheat_t *cheat)
 {
 	int i;
+
+	USED(cheat);
 	if (player->morphTics)
 	{
 		return;
@@ -2072,16 +2087,19 @@
 
 static void CheatQuickenFunc1(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	P_SetMessage(player, "TRYING TO CHEAT?  THAT'S ONE....", true);
 }
 
 static void CheatQuickenFunc2(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	P_SetMessage(player, "THAT'S TWO....", true);
 }
 
 static void CheatQuickenFunc3(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	P_DamageMobj(player->mo, NULL, player->mo, 10000);
 	P_SetMessage(player, "THAT'S THREE!  TIME TO DIE.", true);
 }
@@ -2088,6 +2106,7 @@
 
 static void CheatClassFunc1(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 /* P_SetMessage isn't variably arg'ed: set the messages by hand: */
 #ifdef ASSASSIN
 	P_SetMessage(player, "ENTER NEW PLAYER CLASS (0 - 3)", true);
@@ -2125,6 +2144,7 @@
 
 static void CheatVersionFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	P_SetMessage(player, VERSIONTEXT, true);
 }
 
@@ -2131,6 +2151,7 @@
 static void CheatDebugFunc(player_t *player, Cheat_t *cheat)
 {
 	char textBuffer[50];
+	USED(cheat);
 	snprintf(textBuffer, sizeof(textBuffer), "MAP %d (%d)  X:%5d  Y:%5d  Z:%5d",
 				P_GetMapWarpTrans(gamemap),
 				gamemap,
@@ -2142,11 +2163,13 @@
 
 static void CheatScriptFunc1(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	P_SetMessage(player, "RUN WHICH SCRIPT(01-99)?", true);
 }
 
 static void CheatScriptFunc2(player_t *player, Cheat_t *cheat)
 {
+	USED(cheat);
 	P_SetMessage(player, "RUN WHICH SCRIPT(01-99)?", true);
 }
 
@@ -2177,6 +2200,8 @@
 
 static void CheatRevealFunc(player_t *player, Cheat_t *cheat)
 {
+	USED(player);
+	USED(cheat);
 	cheating = (cheating + 1) % 3;
 }
 
@@ -2194,6 +2219,7 @@
 	{
 		return;
 	}
+	USED(cheat);
 	snprintf(buffer, sizeof(buffer), "ENTER DESIRED CD TRACK (%.2d - %.2d):\n",
 					  I_CDMusFirstTrack(), I_CDMusLastTrack());
 	P_SetMessage(player, buffer, true);
--- a/st_start.c
+++ b/st_start.c
@@ -175,6 +175,7 @@
 
 void ST_UpdateNotches(int notchPosition)
 {
+	USED(notchPosition);
 #if defined(__WATCOMC__) || defined(__DJGPP__) || defined(__DOS__)
 	int x = ST_PROGRESS_X + notchPosition*ST_NOTCH_WIDTH;
 	int y = ST_PROGRESS_Y;
@@ -191,6 +192,7 @@
 
 void ST_UpdateNetNotches(int notchPosition)
 {
+	USED(notchPosition);
 #if defined(__WATCOMC__) || defined(__DJGPP__) || defined(__DOS__)
 	int x = ST_NETPROGRESS_X + notchPosition*ST_NETNOTCH_WIDTH;
 	int y = ST_NETPROGRESS_Y;
--- a/w_wad.c
+++ b/w_wad.c
@@ -744,7 +744,7 @@
 		ST_Message ("\nIt appears that you are using a 4-player-only Version 1.0 hexen.wad.\n");
 		ST_Message ("Running HHexen without a Version 1.1 wadfile can cause many problems.\n");
 		ST_Message ("\nPress <ENTER> to continue.\n");
-		getchar();
+		USED(getchar());
 	}
 #endif
 }