add more function attributes.

We add the nonnull() attribute to enable gcc to warn us at compile time
instead of the runtime asserts (if asserts are present.)

Compile time warnings/errors are superior to run time warning.
More doc.
more attributes.
Mer doc
more doc
more doc and attributes.