]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix uninitialized globals
authorRudolf Polzer <divverent@xonotic.org>
Mon, 31 Dec 2012 11:43:15 +0000 (12:43 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 31 Dec 2012 11:43:15 +0000 (12:43 +0100)
qcsrc/Makefile
qcsrc/client/View.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/csqcmodellib/cl_model.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/g_damage.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles_def.qh

index d90ce997b1614e155fcf5356202d050dc4156d7b..9fa80f8f884b8f215c249e0e9ce64a1d0f4a7a80 100644 (file)
@@ -7,22 +7,32 @@ VERSION_MESSAGE = $(shell cd server && $(QCC) --version --help)
 ifneq (,$(findstring GMQCC,$(VERSION_MESSAGE)))
 # this is gmqcc
 QCCFLAGS ?= \
-       -std=gmqcc \
+       -std=fteqcc \
        -Werror -Wall \
        -Wno-field-redeclared \
        -Wno-double-declaration \
        -Wno-uninitialized-global \
        -O3 \
+       -fadjust-vector-fields \
        -fftepp \
+       -fftepp-predefs \
+       -frelaxed-switch \
+       -fshort-logic \
+       -fno-perl-logic \
        -ftranslatable-strings \
-       -fadjust-vector-fields \
+       -fno-initialized-nonconstants \
        -fno-assign-function-types \
+       -flno \
        -fcorrect-ternary \
+       -fno-single-vector-defs \
        -fcorrect-logic \
        -ftrue-empty-strings \
+       -fno-false-empty-strings \
+       -futf8 \
+       -fno-bail-on-werror \
+       -floop-labels \
        -funtyped-nil \
-       -fshort-logic \
-       -flno \
+       -fno-permissive \
        $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
 else
 # this. is. fteqccccccccccccccccccc!
index eb70262eaff5f99e3f4e2512d12f310bdaf3d008..940f810573f3283f007b310855df39813e939c8f 100644 (file)
@@ -782,7 +782,6 @@ void CSQC_UpdateView(float w, float h)
 
 
        // improved polyblend
-       vector rgb;
        if(autocvar_hud_contents)
        {
                float contentalpha_temp, incontent, liquidalpha, contentfadetime;
index 5efa11cf5d2af976200cb202f5eeac08081bacfd..1c8c3c483a3bc031085b77655d462b50ef5855d5 100644 (file)
@@ -212,13 +212,13 @@ void Net_VehicleSetup()
     }
 }
 #define HUD_GETSTATS \
-    float vh_health    = getstati(STAT_VEHICLESTAT_HEALTH);  \
-       float shield    = getstati(STAT_VEHICLESTAT_SHIELD);  \
-       float energy    = getstati(STAT_VEHICLESTAT_ENERGY);  \
-       float ammo1     = getstati(STAT_VEHICLESTAT_AMMO1);   \
-       float reload1   = getstati(STAT_VEHICLESTAT_RELOAD1); \
-       float ammo2     = getstati(STAT_VEHICLESTAT_AMMO2);   \
-       float reload2   = getstati(STAT_VEHICLESTAT_RELOAD2);
+    noref float vh_health    = getstati(STAT_VEHICLESTAT_HEALTH);  \
+       noref float shield    = getstati(STAT_VEHICLESTAT_SHIELD);  \
+       noref float energy    = getstati(STAT_VEHICLESTAT_ENERGY);  \
+       noref float ammo1     = getstati(STAT_VEHICLESTAT_AMMO1);   \
+       noref float reload1   = getstati(STAT_VEHICLESTAT_RELOAD1); \
+       noref float ammo2     = getstati(STAT_VEHICLESTAT_AMMO2);   \
+       noref float reload2   = getstati(STAT_VEHICLESTAT_RELOAD2);
 
 void CSQC_BUMBLE_HUD()
 {
index 163a5126d3be8f34b5e96289d61740c42c2eae0d..a1a41412644f87cb247742a7a7451fa7f2e60680 100644 (file)
@@ -145,9 +145,9 @@ void CSQCModel_InterpolateAnimation_Do()
 void CSQCModel_Draw()
 {
        // some nice flags for CSQCMODEL_IF and the hooks
-       float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
-       float islocalplayer = (self.entnum == player_localnum + 1);
-       float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
+       noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
+       noref float islocalplayer = (self.entnum == player_localnum + 1);
+       noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
 
        // we don't do this for the local player as that one is already handled
        // by CSQCPlayer_SetCamera()
@@ -179,9 +179,9 @@ void CSQCModel_Read(float isnew)
        sf = ReadShort();
 
        // some nice flags for CSQCMODEL_IF and the hooks
-       float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
-       float islocalplayer = (self.entnum == player_localnum + 1);
-       float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
+       noref float isplayer = (self.entnum >= 1 && self.entnum <= maxclients);
+       noref float islocalplayer = (self.entnum == player_localnum + 1);
+       noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
 
        self.classname = "csqcmodel";
        self.iflags |= IFLAG_ANGLES; // interpolate angles too
index 2dd52317569ab862e62a3a01ae56fe98c1b1761f..0710ddfa8474874cca23787d9ed6221e44660ebd 100644 (file)
@@ -830,8 +830,6 @@ void GameCommand_animbench(float request, float argc)
                case CMD_REQUEST_COMMAND:
                {
                        entity tmp_entity;
-                       float i;
-                       vector v;
 
                        if(argc >= 4)
                        {
index 2e5d9f4d606e0190225a37433460d117c31c8323..a3eeefb73033ce71cfa2532ce575378af314904e 100644 (file)
@@ -339,7 +339,7 @@ void Send_CSQC_KillCenterprint(entity e, string s1, string s2, float msg, float
 void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 {
        string  s, a, msg;
-       float w, type;
+       float type;
 
        if (targ.classname == "player")
        {
index ebd74754f96abc2144f2818aa775f870e5cb9333..9bbdd096a259e609b5aa3bfdb46cc485f7393569 100644 (file)
@@ -286,7 +286,6 @@ void spiderbot_rocket_do()
                                    DEATH_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
             
             crosshair_trace(self.owner);
-            vector _ct_end = trace_endpos + trace_plane_normal;
             
             rocket.pos1       = trace_endpos + randomvec() * (0.75 * autocvar_g_vehicle_spiderbot_rocket_radius);
             rocket.pos1_z       = trace_endpos_z;
index 30633ed3616e8c726f6e6c654c037c5b47734467..f1d3890447140399b4206ac232694483aa42c1b1 100644 (file)
@@ -62,7 +62,6 @@ var .void() vehicle_die;    /// Vehicles custom function to be executed when veh
 #define VHSF_NORMAL 0
 #define VHSF_FACTORY 2
 var .void(float _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
-var .float(float _imp) vehicles_impusle_null;
 var .float(float _imp) vehicles_impusle;
 .float vehicle_weapon2mode = volly_counter;