From: Rudolf Polzer Date: Tue, 18 Dec 2012 11:45:30 +0000 (+0100) Subject: more uninitialized fixes X-Git-Tag: xonotic-v0.7.0~175 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0dbf2548f6fc4c0cc5ce9874ccef5cfa8ec8874;p=xonotic%2Fxonotic-data.pk3dir.git more uninitialized fixes --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index d1e9bee8e..2266cc8e6 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -6,7 +6,7 @@ QCC ?= fteqcc VERSION_MESSAGE = $(shell $(QCC) --version --help) ifneq (,$(findstring GMQCC,$(VERSION_MESSAGE))) # this is gmqcc -QCCFLAGS ?= -Werror -Wall -Wno-field-redeclared -Wno-double-declaration -Wno-assign-function-types -Wno-unused-variable -std=fteqcc -O1 -fshort-logic -ftranslatable-strings -flno $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK) +QCCFLAGS ?= -Werror -Wall -Wno-field-redeclared -Wno-double-declaration -Wno-assign-function-types -Wno-unused-variable -std=fteqcc -O3 -fshort-logic -ftranslatable-strings -flno $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK) else # this. is. fteqccccccccccccccccccc! QCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index ee7ff6e8f..d1ec48f6c 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -948,7 +948,7 @@ void HUD_Ammo(void) ammo_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows); } - local noref vector offset; // fteqcc sucks + local vector offset = '0 0 0'; // fteqcc sucks float newSize; if(ammo_size_x/ammo_size_y > 3) { @@ -4550,7 +4550,7 @@ void HUD_Physics(void) HUD_Panel_GetProgressBarColor(speed); HUD_Panel_DrawProgressBar(panel_pos + speed_offset, panel_size, "progressbar", speed/max_speed, 0, speed_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } - vector tmp_offset, tmp_size; + vector tmp_offset = '0 0 0', tmp_size; if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 2) { tmp_size_x = panel_size_x * 0.75; diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index 6e345476e..cd45a7dcb 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -750,7 +750,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) } tab_backward = (hudShiftState & S_SHIFT); - float k, level, start_pos_x; + float k, level = 0, start_pos_x; vector candidate_pos; const float LEVELS_NUM = 4; float level_height = vid_conheight / LEVELS_NUM; diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index e993a7f5e..0a8e6f0b2 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -52,7 +52,7 @@ vector MapVote_RGB(float id, float count) void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, float id) { - vector img_size; + vector img_size = '0 0 0'; vector rgb; string label; float text_size;