From a1cc887b24a88d0686c7d267e1d0d196421fcd65 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 20 May 2020 00:00:57 +1000 Subject: [PATCH] Fix some warnings found by FTEQCC --- qcsrc/client/hud/panel/quickmenu.qc | 2 +- qcsrc/common/vehicles/vehicle/racer_weapon.qc | 6 +++--- qcsrc/lib/map.qh | 2 +- qcsrc/server/g_damage.qc | 4 ++-- qcsrc/server/g_world.qc | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index c58fb2a67..a0bd8727a 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -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; } } diff --git a/qcsrc/common/vehicles/vehicle/racer_weapon.qc b/qcsrc/common/vehicles/vehicle/racer_weapon.qc index f7253d8d8..473f9a757 100644 --- a/qcsrc/common/vehicles/vehicle/racer_weapon.qc +++ b/qcsrc/common/vehicles/vehicle/racer_weapon.qc @@ -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; diff --git a/qcsrc/lib/map.qh b/qcsrc/lib/map.qh index ea7f0e1fe..d89dc2b64 100644 --- a/qcsrc/lib/map.qh +++ b/qcsrc/lib/map.qh @@ -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) { diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 84ae1279d..555a73472 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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 ); } diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index fce1f942d..8f131b745 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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)); -- 2.39.2