From 121079934564d8cedaec267dbfb6597bb784303e Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Sat, 3 Oct 2009 18:03:54 +0000 Subject: [PATCH] Add /* NOTREACHED */ comments --- bin/dig/dig.c | 5 ++++- bin/dnssec/dnssec-keyfromlabel.c | 3 ++- bin/dnssec/dnssec-keygen.c | 3 ++- bin/dnssec/dnssec-signzone.c | 3 ++- bin/dnssec/dnssectool.c | 4 +++- lib/dns/rbtdb.c | 3 ++- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 884cc95388..9783024bc8 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.232 2009/09/29 15:06:05 fdupont Exp $ */ +/* $Id: dig.c,v 1.233 2009/10/03 18:03:53 each Exp $ */ /*! \file */ @@ -1155,6 +1155,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, have_ipv6 = ISC_FALSE; } else { fatal("can't find IPv4 networking"); + /* NOTREACHED */ return (ISC_FALSE); } break; @@ -1164,6 +1165,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, have_ipv4 = ISC_FALSE; } else { fatal("can't find IPv6 networking"); + /* NOTREACHED */ return (ISC_FALSE); } break; @@ -1387,6 +1389,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, fprintf(stderr, "Invalid option: -%s\n", option); usage(); } + /* NOTREACHED */ return (ISC_FALSE); } diff --git a/bin/dnssec/dnssec-keyfromlabel.c b/bin/dnssec/dnssec-keyfromlabel.c index 370b02a5e9..f0e41d1101 100644 --- a/bin/dnssec/dnssec-keyfromlabel.c +++ b/bin/dnssec/dnssec-keyfromlabel.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keyfromlabel.c,v 1.16 2009/09/29 15:06:06 fdupont Exp $ */ +/* $Id: dnssec-keyfromlabel.c,v 1.17 2009/10/03 18:03:53 each Exp $ */ /*! \file */ @@ -384,6 +384,7 @@ main(int argc, char **argv) { alg_format(alg, algstr, sizeof(algstr)); fatal("failed to get key %s/%s: %s\n", namestr, algstr, isc_result_totext(ret)); + /* NOTREACHED */ exit(-1); } diff --git a/bin/dnssec/dnssec-keygen.c b/bin/dnssec/dnssec-keygen.c index 86d8bbdee1..0c5d497fce 100644 --- a/bin/dnssec/dnssec-keygen.c +++ b/bin/dnssec/dnssec-keygen.c @@ -29,7 +29,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keygen.c,v 1.97 2009/09/29 15:06:06 fdupont Exp $ */ +/* $Id: dnssec-keygen.c,v 1.98 2009/10/03 18:03:53 each Exp $ */ /*! \file */ @@ -668,6 +668,7 @@ main(int argc, char **argv) { alg_format(alg, algstr, sizeof(algstr)); fatal("failed to generate key %s/%s: %s\n", namestr, algstr, isc_result_totext(ret)); + /* NOTREACHED */ exit(-1); } diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index cfa01f7811..5532e1a34e 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -29,7 +29,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-signzone.c,v 1.239 2009/09/29 22:17:34 each Exp $ */ +/* $Id: dnssec-signzone.c,v 1.240 2009/10/03 18:03:54 each Exp $ */ /*! \file */ @@ -372,6 +372,7 @@ expecttofindkey(dns_name_t *name) { dns_name_format(name, namestr, sizeof(namestr)); fatal("failure looking for '%s DNSKEY' in database: %s", namestr, isc_result_totext(result)); + /* NOTREACHED */ return (ISC_FALSE); /* removes a warning */ } diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 62f3da33ba..22111ef529 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.c,v 1.53 2009/09/03 00:12:23 each Exp $ */ +/* $Id: dnssectool.c,v 1.54 2009/10/03 18:03:54 each Exp $ */ /*! \file */ @@ -282,6 +282,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) { default: fatal("time value %s is invalid", str); } + /* NOTREACHED */ break; case 'W': case 'w': return (offset * (7 * 24 * 3600)); @@ -294,6 +295,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) { default: fatal("time value %s is invalid", str); } + /* NOTREACHED */ return(0); /* silence compiler warning */ } diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 0bbf3d9c97..4d08629a8e 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.278 2009/09/01 00:22:26 jinmei Exp $ */ +/* $Id: rbtdb.c,v 1.279 2009/10/03 18:03:54 each Exp $ */ /*! \file */ @@ -3916,6 +3916,7 @@ zone_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options, FATAL_ERROR(__FILE__, __LINE__, "zone_findzonecut() called!"); + /* NOTREACHED */ return (ISC_R_NOTIMPLEMENTED); }