From: terencehill Date: Tue, 5 Feb 2013 23:12:20 +0000 (+0100) Subject: Remove compiler warnings X-Git-Tag: xonotic-v0.7.0~61^2~62 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df31b95e3aa186620e42192d1c6baa88055ff47d;p=xonotic%2Fxonotic-data.pk3dir.git Remove compiler warnings --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 095b0978b..4b06cbf01 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3302,6 +3302,11 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, float layout, f float stat; string pic; vector color; +#ifdef GMQCC + stat = -1; + pic = ""; + color = '0 0 0'; +#endif switch(i) { case 0: @@ -3319,10 +3324,12 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, float layout, f pic = "player_yellow.tga"; color = '1 1 0'; break; + default: case 3: stat = getstati(STAT_PINKALIVE); pic = "player_pink.tga"; color = '1 0 1'; + break; } if(mySize_x/mySize_y > aspect_ratio) @@ -3352,7 +3359,7 @@ void HUD_Mod_CA(vector myPos, vector mySize) { mod_active = 1; // required in each mod function that always shows something entity tm; - float teams_count; + float teams_count = 0; for(tm = teams.sort_next; tm; tm = tm.sort_next) if(tm.team != COLOR_SPECTATOR) ++teams_count; @@ -3369,7 +3376,7 @@ void HUD_Mod_CA(vector myPos, vector mySize) columns = ceil(teams_count/rows); int i; - float row, column; + float row = 0, column = 0; for(i=0; i= 1) winner_team = COLOR_TEAM1; if(bluealive >= 1) @@ -129,7 +129,7 @@ float CA_CheckTeams() } if(prev_total_players != total_players) { - string teams_missing; + string teams_missing = ""; if(!redalive) teams_missing = strcat(teams_missing, ColoredTeamName(COLOR_TEAM1), ", "); if(!bluealive) teams_missing = strcat(teams_missing, ColoredTeamName(COLOR_TEAM2), ", "); if(ca_teams >= 3) diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index e29079b62..7b947faed 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -87,7 +87,7 @@ float freezetag_CheckTeams() float freezetag_getWinnerTeam() { - float winner_team; + float winner_team = 0; if(redalive >= 1) winner_team = COLOR_TEAM1; if(bluealive >= 1) diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index d94d9b9cd..96d3dc896 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -40,7 +40,7 @@ void round_handler_Think() self.cnt = 0; self.round_endtime = time + self.round_timelimit; self.nextthink = time; - if(self.roundStart != func_null) + if(self.roundStart) self.roundStart(); return; }