Fix some warnings found by FTEQCC
authorMario <mario.mario@y7mail.com>
Tue, 19 May 2020 14:00:57 +0000 (00:00 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 19 May 2020 14:00:57 +0000 (00:00 +1000)
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/lib/map.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc

index c58fb2a..a0bd872 100644 (file)
@@ -863,7 +863,7 @@ void QuickMenu_Default(string target_submenu)
        {
                LOG_INFOF("Couldn't find submenu \"%s\"", target_submenu);
                if(prvm_language != "en")
-                       LOG_INFOF("^3Warning: submenu title must be in English", target_submenu);
+                       LOG_INFO("^3Warning: submenu title must be in English");
                QuickMenu_Buffer_Size = 0;
        }
 }
index f7253d8..473f9a7 100644 (file)
@@ -17,12 +17,12 @@ METHOD(RacerAttack, wr_think, void(entity thiswep, entity actor, .entity weapone
         string tagname = (veh.cnt)
             ? (veh.cnt = 0, "tag_fire1")
             : (veh.cnt = 1, "tag_fire2");
-        vector shotorg = gettaginfo(veh, gettagindex(veh, tagname));
-        w_shotorg = shotorg;
+        vector vshotorg = gettaginfo(veh, gettagindex(veh, tagname));
+        w_shotorg = vshotorg;
         w_shotdir = v_forward;
         // Fix z-aim (for chase mode)
         crosshair_trace(player);
-        w_shotdir.z = normalize(trace_endpos - shotorg).z * 0.5;
+        w_shotdir.z = normalize(trace_endpos - vshotorg).z * 0.5;
 
         if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0, DEATH_VH_WAKI_GUN.m_id);
         vector org = w_shotorg;
index ea7f0e1..d89dc2b 100644 (file)
@@ -69,7 +69,7 @@ ERASEABLE
 void db_dump(int db, string filename)
 {
        int fh = fopen(filename, FILE_WRITE);
-       if (fh < 0) LOG_FATALF("Can't dump DB to %s");
+       if (fh < 0) LOG_FATALF("Can't dump DB to %s", filename);
        fputs(fh, "0\n");
        for (int i = 0, n = buf_getsize(db); i < n; ++i)
        {
index 84ae127..555a734 100644 (file)
@@ -199,9 +199,9 @@ float Obituary_WeaponDeath(
        else
        {
                LOG_TRACEF(
-                       "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
+                       "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %s!\n",
                        deathtype,
-                       death_weapon
+                       death_weapon.netname
                );
        }
 
index fce1f94..8f131b7 100644 (file)
@@ -823,7 +823,7 @@ spawnfunc(worldspawn)
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
        if(autocvar_sv_eventlog)
        {
-               string s = sprintf("%d.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
                matchid = strzone(s);
 
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));