The reported function raises a warning when compilers assert the flag
-Warray-parameter=, signaling that an array-type argument was promoted
to a pointer-type argument.
While in practice in most C implementations this is correct, fixing the
warning (and, in this case, indicating the maximum size for the array)
would represent a best-practice for finding out-of-bound accesses or
identifying wrongly-sized arrays passed in the function.
The reported function raises a warning when compilers assert the flag
-Warray-parameter=
, signaling that an array-type argument was promoted to a pointer-type argument.While in practice in most C implementations this is correct, fixing the warning (and, in this case, indicating the maximum size for the array) would represent a best-practice for finding out-of-bound accesses or identifying wrongly-sized arrays passed in the function.
Signed-off-by: Francesco Giancane francesco.giancane@accenture.com