Hi Jim, all,
> >> I suggest you declare those functions with the "nonnull" attribute.
>
> I was referring to the functions in progname.h:
>
> set_program_name
> set_program_name_and_installdir
More generally, it could make sense to mark many functions in gnulib, from
"acl.h" to "xvasprintf.h", with __nonnull__ declaration annotations.
Arguments for doing it:
- Allows GCC to produce its warning when passed a literal NULL value.
- An added piece of documentation (but only when done completely,
throughout gnulib).
Arguments against doing it:
- People should expect to be able to pass NULL only when the documentation/
specification says so. We should not encourage the expectation that NULL
is valid everywhere.
- It's a lot of work :-)
Opinions?
Bruno