From: Rudolf Polzer Date: Thu, 26 Apr 2012 10:00:51 +0000 (+0200) Subject: fix some more uninitialized locals; disable a broken fteqcc optimization X-Git-Tag: xonotic-v0.7.0~328 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=182528cb3cc2e8fc6f1aef5609463dc32c3336c5;p=xonotic%2Fxonotic-data.pk3dir.git fix some more uninitialized locals; disable a broken fteqcc optimization --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 618e3ad4e..27f6fc993 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -3,7 +3,7 @@ FTEQCC ?= fteqcc PERL ?= perl FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON -FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK) +FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK) FTEQCCFLAGS_PROGS ?= FTEQCCFLAGS_MENU ?= diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index b68bce694..e95e93324 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -547,11 +547,11 @@ void FixPlayermodel() vector m1, m2; defaultmodel = ""; + defaultskin = 0; + chmdl = FALSE; if(autocvar_sv_defaultcharacter == 1) { - defaultskin = 0; - if(teamplay) { string s; diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index e70ce44dd..045409b47 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -81,6 +81,7 @@ void GameCommand_adminmsg(float request, float argc) float infobartime = stof(argv(3)); string successful, t; + successful = string_null; if((targets) && (admin_message)) { @@ -166,7 +167,7 @@ void GameCommand_allspec(float request, float argc) { entity client; string reason = argv(1); - float i; + float i = 0; FOR_EACH_REALPLAYER(client) { @@ -528,7 +529,7 @@ void GameCommand_defer_clear_all(float request) case CMD_REQUEST_COMMAND: { entity client; - float i; + float i = 0; float argc; FOR_EACH_CLIENT(client) @@ -904,6 +905,7 @@ void GameCommand_moveplayer(float request, float argc) string notify = argv(3); string successful, t; + successful = string_null; // lets see if the target(s) even actually exist. if((targets) && (destination)) @@ -1242,6 +1244,8 @@ void GameCommand_shuffleteams(float request) float i, x, z, t_teams, t_players, team_color; // count the total amount of players and total amount of teams + t_players = 0; + t_teams = 0; FOR_EACH_PLAYER(tmp_player) { CheckAllowedTeams(tmp_player); @@ -1803,4 +1807,4 @@ void GameCommand(string command) print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n"); return; -} \ No newline at end of file +}