Introduce nonnull attributes in the signal and pthread headers.
authorpfg <pfg@FreeBSD.org>
Tue, 24 Mar 2015 20:33:24 +0000 (20:33 +0000)
committerpfg <pfg@FreeBSD.org>
Tue, 24 Mar 2015 20:33:24 +0000 (20:33 +0000)
commitff36510cfcf3d8f967bcdc7b01f8e01cc54d5618
tree12b8bf32a3239f2295454bcd1d384d931e12cf44
parent2ef1cdce8ec56c3e9a3a5c90dcdef66388734ad8
Introduce nonnull attributes in the signal and pthread headers.

The `nonnull' attribute specifies that some function parameters should be
non-null pointers.  This is very useful as it helps the compiler generate
warnings on suspicious code and can also enable some small optimizations.
In clang this is also useful for the static analyzer.

While we could go on defining this all over the tree, it only
makes sense to annotate a subset of critical functions.

Hinted by: Android's bionic libc
Differential Revision: https://reviews.freebsd.org/D2101
include/pthread.h
include/signal.h