]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove compiler warnings
authorterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 23:12:20 +0000 (00:12 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 23:12:20 +0000 (00:12 +0100)
qcsrc/client/hud.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/round_handler.qc

index 095b0978b50c2ed09eb38fd34bd736d40f1a037e..4b06cbf019cb219122b9bafe41a58690bfe7b714 100644 (file)
@@ -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<teams_count; ++i)
        {
                vector pos, itemSize;
index 1a27b119e218126354275d6b5b26be715db02e86..f791768816f090d762ec15b5f51c9f19243cd38f 100644 (file)
@@ -40,7 +40,7 @@ void CA_count_alive_players()
 
 float CA_GetWinnerTeam()
 {
-       float winner_team;
+       float winner_team = 0;
        if(redalive >= 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)
index e29079b62c38eec377917e22317e527923877ee1..7b947faed50db2f768f6dd340849432ea36395c3 100644 (file)
@@ -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)
index d94d9b9cd4104a307c896cfdf1e91d953097f6f7..96d3dc896ab28dbf42735d8f03b62b39b600c9ea 100644 (file)
@@ -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;
                        }