From f761f5bd266d0960f1699327c7a44bf9bc88795e Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 26 Oct 2010 20:36:43 +0200 Subject: [PATCH] fix some warnings in HUD code --- Makefile | 2 +- qcsrc/client/View.qc | 1 - qcsrc/client/miscfunctions.qc | 14 +++++++------- qcsrc/client/scoreboard.qc | 1 - 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 66e8f737fc..6c9b39c890 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ ZIPEXCLUDE ?= -x\!*.pk3 -xr\!\.svn -x\!qcsrc DIFF ?= diff FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"^1$(shell git describe) TEST BUILD"' -FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-c -Ono-cs -flo $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK) +FTEQCCFLAGS ?= -Werror -Wno-Q205 -Wno-Q302 -O3 -Ono-c -Ono-cs -flo $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK) FTEQCCFLAGS_PROGS ?= FTEQCCFLAGS_MENU ?= diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 5ac1f965e3..25bde8975c 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -825,7 +825,6 @@ void CSQC_UpdateView(float w, float h) ring_scale = cvar("crosshair_ring_size"); - float f, a; wcross_size = drawgetimagesize(wcross_name) * wcross_scale; float nex_charge; diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 049368c163..0978f362d7 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -460,21 +460,21 @@ void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, } // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box -var float imgaspect; -var float aspect; +var float _drawpic_imgaspect; +var float _drawpic_aspect; #define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\ do {\ vector imgsize;\ imgsize = drawgetimagesize(pic);\ - imgaspect = imgsize_x/imgsize_y;\ + _drawpic_imgaspect = imgsize_x/imgsize_y;\ vector oldsz, sz;\ oldsz = sz = mySize;\ - aspect = sz_x/sz_y;\ - if(aspect > imgaspect) {\ - sz_x = sz_y * imgaspect;\ + _drawpic_aspect = sz_x/sz_y;\ + if(_drawpic_aspect > _drawpic_imgaspect) {\ + sz_x = sz_y * _drawpic_imgaspect;\ drawpic(pos + eX * (oldsz_x - sz_x) * 0.5, pic, sz, color, alpha, drawflag);\ } else {\ - sz_y = sz_x / imgaspect;\ + sz_y = sz_x / _drawpic_imgaspect;\ drawpic(pos + eY * (oldsz_y - sz_y) * 0.5, pic, sz, color, alpha, drawflag);\ }\ } while(0) diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 4000f30a70..2fdf0d2203 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -976,7 +976,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) float padding; padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value - float weapon_hit, weapon_damage; weapon_damage = weapon_fired[self.weapon-WEP_FIRST]; if(weapon_damage) { -- 2.39.2