Declare the arrays out of the function
We have the function create_array_from_string
, which
creates the array FOO_array
from the variable string FOO
.
We observe the following warning:
warning: RPMBUILD_WITHOUT_NATIVE_TOOLS_array is referenced but not assigned
The array is created inside the function with global scope, but the linter get confused.
To prevent this warning, declare the arrays right before calling this function.
Edited by Tino Calancha