diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2020-01-09 18:16:02 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2020-01-09 18:16:02 +0000 |
commit | b96618144c327b9e62653904e85c38b00b8c3ab1 (patch) | |
tree | 6c52430c599df83d88c783dfbf499e526b0c1598 /usr.sbin | |
parent | 18a132ea3ded3665d4ee15f7a4e1ed68759e9a4a (diff) |
We use __dead for functions that do not return.
OK millert
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bind/bin/dig/dig.c | 8 | ||||
-rw-r--r-- | usr.sbin/bind/bin/dig/host.c | 6 | ||||
-rw-r--r-- | usr.sbin/bind/bin/dig/include/dig/dig.h | 4 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isc/include/isc/assertions.h | 9 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isc/include/isc/error.h | 11 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isc/include/isc/platform.h.in | 6 |
6 files changed, 20 insertions, 24 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c index 847087b84c7..4dbb82ed22f 100644 --- a/usr.sbin/bind/bin/dig/dig.c +++ b/usr.sbin/bind/bin/dig/dig.c @@ -14,10 +14,10 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.34 2020/01/09 14:19:49 florian Exp $ */ +/* $Id: dig.c,v 1.35 2020/01/09 18:16:00 florian Exp $ */ /*! \file */ - +#include <sys/cdefs.h> #include <config.h> #include <stdlib.h> #include <time.h> @@ -163,8 +163,8 @@ print_usage(FILE *fp) { " +[no]tcp +timeout=# +[no]trace +tries=# +[no]ttlid +[no]vc\n", fp); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +static __dead void +usage(void); static void usage(void) { diff --git a/usr.sbin/bind/bin/dig/host.c b/usr.sbin/bind/bin/dig/host.c index 98332b92b10..e19a51eba3a 100644 --- a/usr.sbin/bind/bin/dig/host.c +++ b/usr.sbin/bind/bin/dig/host.c @@ -15,7 +15,7 @@ */ /*! \file */ - +#include <sys/cdefs.h> #include <config.h> #include <stdlib.h> #include <unistd.h> @@ -133,8 +133,8 @@ rcode_totext(dns_rcode_t rcode) return totext.deconsttext; } -ISC_PLATFORM_NORETURN_PRE static void -show_usage(void) ISC_PLATFORM_NORETURN_POST; +static __dead void +show_usage(void); static void show_usage(void) { diff --git a/usr.sbin/bind/bin/dig/include/dig/dig.h b/usr.sbin/bind/bin/dig/include/dig/dig.h index 57923da88d5..057f1cd5c27 100644 --- a/usr.sbin/bind/bin/dig/include/dig/dig.h +++ b/usr.sbin/bind/bin/dig/include/dig/dig.h @@ -307,9 +307,9 @@ isc_result_t get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int, isc_boolean_t strict); -ISC_PLATFORM_NORETURN_PRE void +__dead void fatal(const char *format, ...) -ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_FORMAT_PRINTF(1, 2); void debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); diff --git a/usr.sbin/bind/lib/isc/include/isc/assertions.h b/usr.sbin/bind/lib/isc/include/isc/assertions.h index 8c8855bc229..82f94073d12 100644 --- a/usr.sbin/bind/lib/isc/include/isc/assertions.h +++ b/usr.sbin/bind/lib/isc/include/isc/assertions.h @@ -15,7 +15,7 @@ */ /* - * $Id: assertions.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ + * $Id: assertions.h,v 1.4 2020/01/09 18:16:01 florian Exp $ */ /*! \file isc/assertions.h */ @@ -23,6 +23,8 @@ #ifndef ISC_ASSERTIONS_H #define ISC_ASSERTIONS_H 1 +#include <sys/cdefs.h> + #include <isc/lang.h> #include <isc/likely.h> #include <isc/platform.h> @@ -41,9 +43,8 @@ typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t, const char *); /* coverity[+kill] */ -ISC_PLATFORM_NORETURN_PRE -void isc_assertion_failed(const char *, int, isc_assertiontype_t, - const char *) ISC_PLATFORM_NORETURN_POST; +__dead void isc_assertion_failed(const char *, int, isc_assertiontype_t, + const char *); void isc_assertion_setcallback(isc_assertioncallback_t); diff --git a/usr.sbin/bind/lib/isc/include/isc/error.h b/usr.sbin/bind/lib/isc/include/isc/error.h index c270742a767..4bc8a2b10a1 100644 --- a/usr.sbin/bind/lib/isc/include/isc/error.h +++ b/usr.sbin/bind/lib/isc/include/isc/error.h @@ -14,13 +14,14 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: error.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: error.h,v 1.4 2020/01/09 18:16:01 florian Exp $ */ #ifndef ISC_ERROR_H #define ISC_ERROR_H 1 /*! \file isc/error.h */ +#include <sys/cdefs.h> #include <stdarg.h> #include <isc/formatcheck.h> @@ -46,13 +47,13 @@ isc_error_unexpected(const char *, int, const char *, ...) ISC_FORMAT_PRINTF(3, 4); /*% fatal error */ -ISC_PLATFORM_NORETURN_PRE void +__dead void isc_error_fatal(const char *, int, const char *, ...) -ISC_FORMAT_PRINTF(3, 4) ISC_PLATFORM_NORETURN_POST; +ISC_FORMAT_PRINTF(3, 4); /*% runtimecheck error */ -ISC_PLATFORM_NORETURN_PRE void -isc_error_runtimecheck(const char *, int, const char *) ISC_PLATFORM_NORETURN_POST; +__dead void +isc_error_runtimecheck(const char *, int, const char *); #define ISC_ERROR_RUNTIMECHECK(cond) \ ((void) (ISC_LIKELY(cond) || \ diff --git a/usr.sbin/bind/lib/isc/include/isc/platform.h.in b/usr.sbin/bind/lib/isc/include/isc/platform.h.in index 78797b564fa..50de90ff1da 100644 --- a/usr.sbin/bind/lib/isc/include/isc/platform.h.in +++ b/usr.sbin/bind/lib/isc/include/isc/platform.h.in @@ -33,12 +33,6 @@ @ISC_PLATFORM_OPENSSLHASH@ /* - * Defines for the noreturn attribute. - */ -@ISC_PLATFORM_NORETURN_PRE@ -@ISC_PLATFORM_NORETURN_POST@ - -/* * Tell emacs to use C mode for this file. * * Local Variables: |