Commit debd489a authored by Francis Dupont's avatar Francis Dupont
Browse files

noreturn RT #20257

parent 1e733ffc
2792. [port] win32: 32/64 bit cleanups. [RT #128244] 2793. [port] Add some noreturn attributes. [RT #20257]
2792. [port] win32: 32/64 bit cleanups. [RT #20335]
2691. [func] dnssec-signzone: retain the existing NSEC or NSEC3 2691. [func] dnssec-signzone: retain the existing NSEC or NSEC3
chain when re-signing a previously-signed zone. chain when re-signing a previously-signed zone.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: named-checkconf.c,v 1.49 2009/07/13 06:57:21 marka Exp $ */ /* $Id: named-checkconf.c,v 1.50 2009/09/29 15:06:05 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -59,6 +59,9 @@ isc_log_t *logc = NULL; ...@@ -59,6 +59,9 @@ isc_log_t *logc = NULL;
} while (0) } while (0)
/*% usage */ /*% usage */
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "usage: %s [-h] [-j] [-v] [-z] [-t directory] " fprintf(stderr, "usage: %s [-h] [-j] [-v] [-z] [-t directory] "
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: named-checkzone.c,v 1.54 2009/05/29 02:14:31 marka Exp $ */ /* $Id: named-checkzone.c,v 1.55 2009/09/29 15:06:05 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -70,6 +70,9 @@ static enum { progmode_check, progmode_compile } progmode; ...@@ -70,6 +70,9 @@ static enum { progmode_check, progmode_compile } progmode;
} \ } \
} while (0) } while (0)
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, fprintf(stderr,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: ddns-confgen.c,v 1.8 2009/07/29 17:52:00 each Exp $ */ /* $Id: ddns-confgen.c,v 1.9 2009/09/29 15:06:05 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -60,6 +60,9 @@ const char *progname; ...@@ -60,6 +60,9 @@ const char *progname;
isc_boolean_t verbose = ISC_FALSE; isc_boolean_t verbose = ISC_FALSE;
ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(int status) { usage(int status) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rndc-confgen.c,v 1.4 2009/06/15 23:47:59 tbox Exp $ */ /* $Id: rndc-confgen.c,v 1.5 2009/09/29 15:06:05 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -69,6 +69,9 @@ isc_boolean_t verbose = ISC_FALSE; ...@@ -69,6 +69,9 @@ isc_boolean_t verbose = ISC_FALSE;
const char *keyfile, *keydef; const char *keyfile, *keydef;
ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(int status) { usage(int status) {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: util.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */ /* $Id: util.h,v 1.4 2009/09/29 15:06:05 fdupont Exp $ */
#ifndef RNDC_UTIL_H #ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1 #define RNDC_UTIL_H 1
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
/*! \file */ /*! \file */
#include <isc/lang.h> #include <isc/lang.h>
#include <isc/platform.h>
#include <isc/formatcheck.h> #include <isc/formatcheck.h>
...@@ -42,8 +43,9 @@ ISC_LANG_BEGINDECLS ...@@ -42,8 +43,9 @@ ISC_LANG_BEGINDECLS
void void
notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2); notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2);
void ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); fatal(const char *format, ...)
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
ISC_LANG_ENDDECLS ISC_LANG_ENDDECLS
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dig.c,v 1.231 2009/09/23 06:21:36 each Exp $ */ /* $Id: dig.c,v 1.232 2009/09/29 15:06:05 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -138,6 +138,9 @@ print_usage(FILE *fp) { ...@@ -138,6 +138,9 @@ print_usage(FILE *fp) {
" [ host [@local-server] {local-d-opt} [...]]\n", fp); " [ host [@local-server] {local-d-opt} [...]]\n", fp);
} }
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
print_usage(stderr); print_usage(stderr);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: host.c,v 1.119 2009/09/08 23:23:22 marka Exp $ */ /* $Id: host.c,v 1.120 2009/09/29 15:06:05 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -141,6 +141,9 @@ rcode_totext(dns_rcode_t rcode) ...@@ -141,6 +141,9 @@ rcode_totext(dns_rcode_t rcode)
return totext.deconsttext; return totext.deconsttext;
} }
ISC_PLATFORM_NORETURN_PRE static void
show_usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
show_usage(void) { show_usage(void) {
fputs( fputs(
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dig.h,v 1.110 2009/09/15 23:48:09 tbox Exp $ */ /* $Id: dig.h,v 1.111 2009/09/29 15:06:06 fdupont Exp $ */
#ifndef DIG_H #ifndef DIG_H
#define DIG_H #define DIG_H
...@@ -292,8 +292,9 @@ isc_result_t ...@@ -292,8 +292,9 @@ isc_result_t
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int, get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
isc_boolean_t strict); isc_boolean_t strict);
void ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); fatal(const char *format, ...)
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
void void
debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-dsfromkey.c,v 1.13 2009/09/01 00:22:24 jinmei Exp $ */ /* $Id: dnssec-dsfromkey.c,v 1.14 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -282,6 +282,9 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside, ...@@ -282,6 +282,9 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
putchar('\n'); putchar('\n');
} }
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-keyfromlabel.c,v 1.15 2009/09/23 16:01:56 each Exp $ */ /* $Id: dnssec-keyfromlabel.c,v 1.16 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -51,6 +51,9 @@ int verbose; ...@@ -51,6 +51,9 @@ int verbose;
static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 |" static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 |"
" NSEC3DSA | NSEC3RSASHA1"; " NSEC3DSA | NSEC3RSASHA1";
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-keygen.c,v 1.96 2009/09/23 16:01:56 each Exp $ */ /* $Id: dnssec-keygen.c,v 1.97 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -73,6 +73,9 @@ dsa_size_ok(int size) { ...@@ -73,6 +73,9 @@ dsa_size_ok(int size) {
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0)); return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
} }
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-revoke.c,v 1.12 2009/09/23 16:01:56 each Exp $ */ /* $Id: dnssec-revoke.c,v 1.13 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -46,6 +46,9 @@ int verbose; ...@@ -46,6 +46,9 @@ int verbose;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-settime.c,v 1.13 2009/09/23 16:01:56 each Exp $ */ /* $Id: dnssec-settime.c,v 1.14 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -48,6 +48,9 @@ int verbose; ...@@ -48,6 +48,9 @@ int verbose;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-signzone.c,v 1.237 2009/09/25 23:48:10 tbox Exp $ */ /* $Id: dnssec-signzone.c,v 1.238 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -3273,6 +3273,9 @@ print_version(FILE *fp) { ...@@ -3273,6 +3273,9 @@ print_version(FILE *fp) {
fprintf(fp, "; dnssec_signzone version " VERSION "\n"); fprintf(fp, "; dnssec_signzone version " VERSION "\n");
} }
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssectool.h,v 1.25 2009/09/04 02:31:29 marka Exp $ */ /* $Id: dnssectool.h,v 1.26 2009/09/29 15:06:06 fdupont Exp $ */
#ifndef DNSSECTOOL_H #ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1 #define DNSSECTOOL_H 1
...@@ -27,8 +27,9 @@ ...@@ -27,8 +27,9 @@
typedef void (fatalcallback_t)(void); typedef void (fatalcallback_t)(void);
void ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); fatal(const char *format, ...)
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
void void
setfatalcallback(fatalcallback_t *callback); setfatalcallback(fatalcallback_t *callback);
......
...@@ -15,15 +15,16 @@ ...@@ -15,15 +15,16 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: main.h,v 1.15 2007/06/19 23:46:59 tbox Exp $ */ /* $Id: main.h,v 1.16 2009/09/29 15:06:06 fdupont Exp $ */
#ifndef NAMED_MAIN_H #ifndef NAMED_MAIN_H
#define NAMED_MAIN_H 1 #define NAMED_MAIN_H 1
/*! \file */ /*! \file */
void ISC_PLATFORM_NORETURN_PRE void
ns_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ns_main_earlyfatal(const char *format, ...)
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
void void
ns_main_earlywarning(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ns_main_earlywarning(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: main.c,v 1.173 2009/09/01 18:40:25 jinmei Exp $ */ /* $Id: main.c,v 1.174 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -138,6 +138,10 @@ ns_main_earlyfatal(const char *format, ...) { ...@@ -138,6 +138,10 @@ ns_main_earlyfatal(const char *format, ...) {
exit(1); exit(1);
} }
ISC_PLATFORM_NORETURN_PRE static void
assertion_failed(const char *file, int line, isc_assertiontype_t type,
const char *cond) ISC_PLATFORM_NORETURN_POST;
static void static void
assertion_failed(const char *file, int line, isc_assertiontype_t type, assertion_failed(const char *file, int line, isc_assertiontype_t type,
const char *cond) const char *cond)
...@@ -207,9 +211,10 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type, ...@@ -207,9 +211,10 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
exit(1); exit(1);
} }
static void ISC_PLATFORM_NORETURN_PRE static void
library_fatal_error(const char *file, int line, const char *format, library_fatal_error(const char *file, int line, const char *format,
va_list args) ISC_FORMAT_PRINTF(3, 0); va_list args)
ISC_FORMAT_PRINTF(3, 0) ISC_PLATFORM_NORETURN_POST;
static void static void
library_fatal_error(const char *file, int line, const char *format, library_fatal_error(const char *file, int line, const char *format,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: server.c,v 1.548 2009/09/10 01:49:29 each Exp $ */ /* $Id: server.c,v 1.549 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -243,8 +243,8 @@ static const struct { ...@@ -243,8 +243,8 @@ static const struct {
{ NULL, ISC_FALSE } { NULL, ISC_FALSE }
}; };
static void ISC_PLATFORM_NORETURN_PRE static void
fatal(const char *msg, isc_result_t result); fatal(const char *msg, isc_result_t result) ISC_PLATFORM_NORETURN_POST;
static void static void
ns_server_reload(isc_task_t *task, isc_event_t *event); ns_server_reload(isc_task_t *task, isc_event_t *event);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: nsupdate.c,v 1.172 2009/09/01 00:22:25 jinmei Exp $ */ /* $Id: nsupdate.c,v 1.173 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -181,8 +181,10 @@ typedef struct nsu_requestinfo { ...@@ -181,8 +181,10 @@ typedef struct nsu_requestinfo {
static void static void
sendrequest(isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr, sendrequest(isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
dns_message_t *msg, dns_request_t **request); dns_message_t *msg, dns_request_t **request);
static void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ISC_PLATFORM_NORETURN_PRE static void
fatal(const char *format, ...)
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
static void static void
debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rndc.c,v 1.125 2009/05/04 17:38:56 jreed Exp $ */ /* $Id: rndc.c,v 1.126 2009/09/29 15:06:06 fdupont Exp $ */
/*! \file */ /*! \file */
...@@ -90,6 +90,9 @@ static isc_uint32_t serial; ...@@ -90,6 +90,9 @@ static isc_uint32_t serial;
static void rndc_startconnect(isc_sockaddr_t *addr, isc_task_t *task); static void rndc_startconnect(isc_sockaddr_t *addr, isc_task_t *task);
ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(int status) { usage(int status) {
fprintf(stderr, "\ fprintf(stderr, "\
......