From e0276adc6499917664aa3aa440dcdd7795ad5541 Mon Sep 17 00:00:00 2001
From: Jakob MG <jakob_mg@hotmail.com>
Date: Wed, 22 Feb 2012 09:36:50 +0100
Subject: [PATCH] Get rid of half a ton of unref locals. CHECK YOUR
 COMPILEUTPUT FOR WARNINGS TOO1ONEELEVEN

---
 qcsrc/common/command/rpn.qc        | 6 +++---
 qcsrc/server/autocvars.qh          | 6 +++---
 qcsrc/server/bot/navigation.qc     | 1 -
 qcsrc/server/bot/waypoints.qc      | 1 -
 qcsrc/server/command/getreplies.qc | 2 +-
 qcsrc/server/command/sv_cmd.qc     | 4 ++--
 qcsrc/server/defs.qh               | 2 +-
 qcsrc/server/w_fireball.qc         | 2 +-
 8 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/qcsrc/common/command/rpn.qc b/qcsrc/common/command/rpn.qc
index d6c624bbb1..c15a8d26ef 100644
--- a/qcsrc/common/command/rpn.qc
+++ b/qcsrc/common/command/rpn.qc
@@ -55,9 +55,9 @@ void GenericCommand_rpn(float request, float argc, string command)
 	{
 		case CMD_REQUEST_COMMAND:
 		{
-			float i, j, f, n, f2, f3, rpnpos;
-			vector rgb;
-			string s, s2, c, rpncmd;
+			float i, j, f, f2, f3, rpnpos;
+			//vector rgb;
+			string s, s2, rpncmd;
 			
 			if(!rpn_db)
 			{
diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh
index e336efc538..dee1727fc1 100644
--- a/qcsrc/server/autocvars.qh
+++ b/qcsrc/server/autocvars.qh
@@ -900,10 +900,10 @@ float autocvar_g_nexball_goalleadlimit;
 float autocvar_g_nexball_radar_showallplayers;
 float autocvar_g_nexball_sound_bounce;
 float autocvar_g_nexball_trail_color;
-float autocvar_g_nick_flood_penalty;
+//float autocvar_g_nick_flood_penalty;
 float autocvar_g_nick_flood_penalty_red;
 float autocvar_g_nick_flood_penalty_yellow;
-float autocvar_g_nick_flood_timeout;
+//float autocvar_g_nick_flood_timeout;
 float autocvar_g_nix_with_healtharmor;
 float autocvar_g_nix_with_laser;
 float autocvar_g_nix_with_powerups;
@@ -1162,7 +1162,7 @@ string autocvar_sv_vote_master_password;
 float autocvar_sv_vote_master_playerlimit;
 float autocvar_sv_vote_no_stops_vote;
 float autocvar_sv_vote_nospectators;
-string autocvar_sv_vote_only_commands;
+//string autocvar_sv_vote_only_commands;
 float autocvar_sv_vote_override_mostrecent;
 float autocvar_sv_vote_singlecount;
 float autocvar_sv_vote_stop;
diff --git a/qcsrc/server/bot/navigation.qc b/qcsrc/server/bot/navigation.qc
index 3387fdfef8..bf963bc7cd 100644
--- a/qcsrc/server/bot/navigation.qc
+++ b/qcsrc/server/bot/navigation.qc
@@ -360,7 +360,6 @@ float navigation_waypoint_will_link(vector v, vector org, entity ent, float walk
 entity navigation_findnearestwaypoint_withdist(entity ent, float walkfromwp, float bestdist)
 {
 	entity waylist, w, best;
-	float dist;
 	vector v, org, pm1, pm2;
 
 	pm1 = ent.origin + ent.mins;
diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc
index 4db72e407d..d31a88b52f 100644
--- a/qcsrc/server/bot/waypoints.qc
+++ b/qcsrc/server/bot/waypoints.qc
@@ -1067,7 +1067,6 @@ void botframe_autowaypoints_fix(entity p, float walkfromwp, .entity fld)
 void botframe_autowaypoints()
 {
 	entity p;
-	entity wp0, wp1;
 	FOR_EACH_REALPLAYER(p)
 	{
 		if(p.deadflag)
diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc
index 29b707b93d..3640c81728 100644
--- a/qcsrc/server/command/getreplies.qc
+++ b/qcsrc/server/command/getreplies.qc
@@ -12,7 +12,7 @@
 	
 string getrecords(float page) // 50 records per page
 {	
-	float rec, r, i;
+	float rec = 0, r, i;
 	string h, s;
 
 	if (g_ctf)
diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc
index 98d877c436..e70ce44ddb 100644
--- a/qcsrc/server/command/sv_cmd.qc
+++ b/qcsrc/server/command/sv_cmd.qc
@@ -1238,8 +1238,8 @@ void GameCommand_shuffleteams(float request)
 		{
 			if(teamplay)
 			{
-				entity tmp_player, client;
-				float i, x, z, t_teams, t_players, team_color, accepted;
+				entity tmp_player;
+				float i, x, z, t_teams, t_players, team_color;
 
 				// count the total amount of players and total amount of teams
 				FOR_EACH_PLAYER(tmp_player)
diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh
index e2d4c7ad8c..6b25c449f6 100644
--- a/qcsrc/server/defs.qh
+++ b/qcsrc/server/defs.qh
@@ -545,7 +545,7 @@ void SUB_UseTargets();
 
 void ClientData_Touch(entity e);
 
-vector debug_shotorg; // if non-zero, overrides the shot origin of all weapons
+//vector debug_shotorg; // if non-zero, overrides the shot origin of all weapons
 
 .float wasplayer;
 
diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc
index 77c67b46bb..1c950aca4a 100644
--- a/qcsrc/server/w_fireball.qc
+++ b/qcsrc/server/w_fireball.qc
@@ -302,7 +302,7 @@ void spawnfunc_weapon_fireball (void)
 
 float w_fireball(float req)
 {
-	float ammo_amount;
+	//float ammo_amount;
 	if (req == WR_AIM)
 	{
 		self.BUTTON_ATCK = FALSE;
-- 
2.39.5