From 1887642b34f4238cb0944771d49f93cd7c2ea769 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 7 Oct 2024 18:10:19 -0500 Subject: [PATCH 1/2] Add some lint annotations --- addons/common/fnc_directCall.sqf | 1 + addons/common/init_perFrameHandler.sqf | 1 + addons/common/test.sqf | 2 +- addons/common/{test_ret.sqf => test_ret.inc.sqf} | 2 +- addons/hashes/fnc_parseYAML.sqf | 1 + addons/ui/fnc_openItemContextMenu.sqf | 1 + addons/versioning/fnc_version_check.sqf | 1 + 7 files changed, 7 insertions(+), 2 deletions(-) rename addons/common/{test_ret.sqf => test_ret.inc.sqf} (94%) diff --git a/addons/common/fnc_directCall.sqf b/addons/common/fnc_directCall.sqf index bc03701b9a..d4eda2224f 100644 --- a/addons/common/fnc_directCall.sqf +++ b/addons/common/fnc_directCall.sqf @@ -28,6 +28,7 @@ private "_CBA_return"; isNil { // Wrap the _CBA_code in an extra call block to prevent problems with exitWith and apply + //IGNORE_PRIVATE_WARNING ["_x"]; _CBA_return = ([_x] apply {call _CBA_code}) select 0; }; diff --git a/addons/common/init_perFrameHandler.sqf b/addons/common/init_perFrameHandler.sqf index 267a387f61..a80a09e6f3 100644 --- a/addons/common/init_perFrameHandler.sqf +++ b/addons/common/init_perFrameHandler.sqf @@ -108,6 +108,7 @@ if (isMultiplayer) then { [QFUNC(missionTimePFH), { SCRIPT(missionTimePFH_server); if (time != GVAR(lastTime)) then { + //IGNORE_PRIVATE_WARNING ["_tickTime"]; CBA_missionTime = CBA_missionTime + (_tickTime - GVAR(lastTickTime)); GVAR(lastTime) = time; // used to detect paused game }; diff --git a/addons/common/test.sqf b/addons/common/test.sqf index b3dea79de4..0f61810bfc 100644 --- a/addons/common/test.sqf +++ b/addons/common/test.sqf @@ -5,7 +5,7 @@ #define DEBUG_MODE_FULL #include "script_component.hpp" -#define TESTS ["common", "config", "inventory", "weaponComponents", "position", "ret", "macro_is_x"] +#define TESTS ["common", "config", "inventory", "weaponComponents", "position", "ret.inc", "macro_is_x"] SCRIPT(test-common); diff --git a/addons/common/test_ret.sqf b/addons/common/test_ret.inc.sqf similarity index 94% rename from addons/common/test_ret.sqf rename to addons/common/test_ret.inc.sqf index c5cc0b2f1c..1acb4f9833 100644 --- a/addons/common/test_ret.sqf +++ b/addons/common/test_ret.inc.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" SCRIPT(test_ret); -// execVM "\x\cba\addons\common\test_ret.sqf"; +// execVM "\x\cba\addons\common\test_ret.inc.sqf"; private ["_funcName", "_result"]; diff --git a/addons/hashes/fnc_parseYAML.sqf b/addons/hashes/fnc_parseYAML.sqf index 1e614406c8..a04cc5d5f6 100644 --- a/addons/hashes/fnc_parseYAML.sqf +++ b/addons/hashes/fnc_parseYAML.sqf @@ -120,6 +120,7 @@ private _parse = { }; if !(_error) then { + //IGNORE_PRIVATE_WARNING ["_data"]; _data pushBack _value; _mode = YAML_MODE_STRING; }; diff --git a/addons/ui/fnc_openItemContextMenu.sqf b/addons/ui/fnc_openItemContextMenu.sqf index c99cdf3053..4753a45aac 100644 --- a/addons/ui/fnc_openItemContextMenu.sqf +++ b/addons/ui/fnc_openItemContextMenu.sqf @@ -57,6 +57,7 @@ private _longestName = ""; { _x params ["_slots", "_displayName", "_tooltip", "_color", "_icon", "_conditionEnable", "_conditionShow", "_statement", "_consume", "_params"]; + //IGNORE_PRIVATE_WARNING ["_unit"]; // seems to come from upper scopes private _args = [_unit, _container, _item, _slot, _params]; if (isLocalized _displayName) then { _displayName = localize _displayName; diff --git a/addons/versioning/fnc_version_check.sqf b/addons/versioning/fnc_version_check.sqf index a216462281..1187529640 100644 --- a/addons/versioning/fnc_version_check.sqf +++ b/addons/versioning/fnc_version_check.sqf @@ -1,6 +1,7 @@ #include "script_component.hpp" // _key, _value are injected by the CBA_fnc_hashEachPair +//IGNORE_PRIVATE_WARNING ["_key", "_value"]; private _localValue = [GVAR(versions), _key] call CBA_fnc_hashGet; TRACE_3("Version Check",_key,_value,_localValue); From 2f91ba9f99000bc3374a45696fc1676476fee7b4 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 12 Oct 2024 19:18:53 -0500 Subject: [PATCH 2/2] _unit was actually missing --- addons/ui/fnc_openItemContextMenu.sqf | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/ui/fnc_openItemContextMenu.sqf b/addons/ui/fnc_openItemContextMenu.sqf index fe817def43..b405bb25aa 100644 --- a/addons/ui/fnc_openItemContextMenu.sqf +++ b/addons/ui/fnc_openItemContextMenu.sqf @@ -58,7 +58,6 @@ private _unit = call CBA_fnc_currentUnit; { _x params ["_slots", "_displayName", "_tooltip", "_color", "_icon", "_conditionEnable", "_conditionShow", "_statement", "_consume", "_params"]; - //IGNORE_PRIVATE_WARNING ["_unit"]; // seems to come from upper scopes private _args = [_unit, _container, _item, _slot, _params]; if (isLocalized _displayName) then { _displayName = localize _displayName;