Browse Source

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@
OPENBSD_5_3
brad 12 years ago
parent
commit
d6092fe99a
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      src/include/setjmp.h

+ 7
- 7
src/include/setjmp.h View File

@ -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 $ */ /* $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]; typedef long jmp_buf[_JBLEN];
__BEGIN_DECLS __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 #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 */ #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
#if __BSD_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); void longjmperror(void);
#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ #endif /* __BSD_VISIBLE || __XPG_VISIBLE */
__END_DECLS __END_DECLS


Loading…
Cancel
Save