From 153cbcd6579a5c285e7f384c09211b081bb800c4 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Mon, 6 Apr 2015 01:39:16 +0000 Subject: Make use of gcc attributes in some standard include 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. Also start using 'alloc_size' attribute in the allocator functions. This is an initial step to better integrate our libc with the compiler: these attributes are fully supported by clang and they are also useful for the static analyzer. Note that due to some bogus internal procedure in the way gcc ports are built they may require updating if they were built before r280801. Relnotes: yes Hinted by: Android's bionic libc Differential Revision: https://reviews.freebsd.org/D2107 --- include/signal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/signal.h') diff --git a/include/signal.h b/include/signal.h index dca19aaa8613..895ccc30bc06 100644 --- a/include/signal.h +++ b/include/signal.h @@ -78,10 +78,10 @@ int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sigismember(const sigset_t *, int); -int sigpending(sigset_t *); +int sigpending(sigset_t *) __nonnull(1); int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); -int sigsuspend(const sigset_t *); -int sigwait(const sigset_t * __restrict, int * __restrict); +int sigsuspend(const sigset_t *) __nonnull(1); +int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull_all; #endif #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 -- cgit v1.2.3