diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2012-09-26 00:09:49 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2012-09-26 00:09:49 +0000 |
commit | 6a4007e86b3a9e44344d953e39ef5a7771459703 (patch) | |
tree | ee4ae1a88ed9cda26237d9ef8b7571323e17e4d3 /include | |
parent | 191d7193dec9010c42c47a8b7b9ea39d8904d5e2 (diff) |
Explicitly annotate setjmp() and longjmp() (and friends) as
__returns_twice and __dead instead of depending on GCC's special
handling of these function names.
With input from kettenis@ and guenther@
Fixes a warning from clang
ok matthew@
Diffstat (limited to 'include')
-rw-r--r-- | include/setjmp.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/setjmp.h b/include/setjmp.h index 28bce8a7830..1028019b493 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: setjmp.h,v 1.5 2005/12/13 00:35:22 millert Exp $ */ +/* $OpenBSD: setjmp.h,v 1.6 2012/09/26 00:09:48 brad Exp $ */ /* $NetBSD: setjmp.h,v 1.11 1994/12/20 10:35:44 cgd Exp $ */ /*- @@ -50,17 +50,17 @@ typedef long sigjmp_buf[_JBLEN + 1]; typedef long jmp_buf[_JBLEN]; __BEGIN_DECLS -int setjmp(jmp_buf); -void longjmp(jmp_buf, int); +__returns_twice int setjmp(jmp_buf); +__dead void longjmp(jmp_buf, int); #if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE -int sigsetjmp(sigjmp_buf, int); -void siglongjmp(sigjmp_buf, int); +__returns_twice int sigsetjmp(sigjmp_buf, int); +__dead void siglongjmp(sigjmp_buf, int); #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */ #if __BSD_VISIBLE || __XPG_VISIBLE -int _setjmp(jmp_buf); -void _longjmp(jmp_buf, int); +__returns_twice int _setjmp(jmp_buf); +__dead void _longjmp(jmp_buf, int); void longjmperror(void); #endif /* __BSD_VISIBLE || __XPG_VISIBLE */ __END_DECLS |