aboutsummaryrefslogtreecommitdiffstats
path: root/include/signal.h
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2017-01-28 20:54:43 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2017-01-28 20:54:43 +0000
commit649702c5a34798b68a51305271a9099f83f4e34f (patch)
tree07257e9473428a20b93966f48b065bab58c5bc4c /include/signal.h
parent8406f869f421565db9462d330c036d5eef2ccc41 (diff)
downloadsrc-649702c5a34798b68a51305271a9099f83f4e34f.tar.gz
src-649702c5a34798b68a51305271a9099f83f4e34f.zip
Make use of clang nullability attributes.
Replace uses of the GCC __nonnull__ attribute with the clang nullability qualifiers. The replacement should be transparent for clang developers as the new qualifiers will produce the same warnings and will be useful for static checkers but will not cause aggressive optimizations. GCC will not produce such warnings and developers will have to use upgraded GCC ports built with the system headers from r312538. Hinted by: Apple's Libc-1158.20.4, Bionic libc MFC after: 11.1 Release Differential Revision: https://reviews.freebsd.org/D9004
Notes
Notes: svn path=/head/; revision=312934
Diffstat (limited to 'include/signal.h')
-rw-r--r--include/signal.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/signal.h b/include/signal.h
index 9d874de3632a..f9b6923c4345 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -41,6 +41,8 @@
#include <sys/_ucontext.h>
#endif
+__NULLABILITY_PRAGMA_PUSH
+
#if __BSD_VISIBLE
/*
* XXX should enlarge these, if only to give empty names instead of bounds
@@ -82,10 +84,11 @@ 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);
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);
+int sigwait(const sigset_t * _Nonnull __restrict,
+ int * _Nonnull __restrict);
#endif
#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600
@@ -104,7 +107,7 @@ int sighold(int);
int sigignore(int);
int sigpause(int);
int sigrelse(int);
-void (*sigset(int, void (*)(int)))(int);
+void (* _Nullable sigset(int, void (* _Nullable)(int)))(int);
int xsi_sigpause(int);
#endif
@@ -124,5 +127,6 @@ int sigstack(const struct sigstack *, struct sigstack *);
int sigvec(int, struct sigvec *, struct sigvec *);
#endif
__END_DECLS
+__NULLABILITY_PRAGMA_POP
#endif /* !_SIGNAL_H_ */