Closed proski closed 1 year ago
I've checked that the code does correct checks for the argv size. The argv_to_*
functions look for the NULL terminator. The argv_from_*
functions fail if the resulting NULL terminated array would exceed SIZEOF_ARG
in size. Both looks correct to me.
This is a very visible warning detected with -Wall
both by gcc and clang. It's about time that we fix it so that -Wall
can be enabled in all builds by default.
LGTM, thanks.
The declaration of argv_to_string() mismatched its definition. The definition had the array size, the declaration had not. Remove array sizes from all functions declared in argv.h.
Array sizes in function arguments don't ensure the code correctness but can give a wrong impression that the compiler would check the array size.