zplug icon indicating copy to clipboard operation
zplug copied to clipboard

Address warnings about global parameters created in functions

Open madduck opened this issue 5 years ago • 1 comments

With zshopt WARNCREATEGLOBAL active, using zplug emits a bunch of warnings, such as:

__zplug::core::core::get_interfaces:31: array parameter reply created globally in function __zplug::core::core::get_interfaces
__zplug::core::core::get_interfaces:45: scalar parameter line created globally in function __zplug::core::core::get_interfaces
__zplug::core::options::long:19: scalar parameter opt created globally in function __zplug::core::options::long

This patch addresses that by making sure that those parameters are properly declared.

I will keep pushing without comment as I find more, so maybe the final result will be a squash commit

Signed-off-by: martin f. krafft [email protected]

madduck avatar Apr 16 '20 08:04 madduck

Note that I've stopped for now, as there are heaps more. I don't have the time right now for this low-level work.

madduck avatar Apr 16 '20 09:04 madduck