[v9_9] silence gcc 7 warnings

4673.	[port]		Silence GCC 7 warnings. [RT #45592]

(cherry picked from commit cdacec1dcb)
(cherry picked from commit 7dbeb5e7f0)
(cherry picked from commit 733404ab8c)
This commit is contained in:
Evan Hunt
2017-08-09 00:38:10 -07:00
parent cf25cdac38
commit c06d35bb34
16 changed files with 33 additions and 20 deletions
+2
View File
@@ -1,3 +1,5 @@
4673. [port] Silence GCC 7 warnings. [RT #45592]
4672. [bug] Fix a regression introduced by change 3938 (when
--enable-fetchlimit is NOT in use), where named
as resolver would, upon fetch timeout, repeat
+3 -2
View File
@@ -319,7 +319,7 @@ static isc_result_t
say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
isc_result_t result;
isc_uint64_t diff;
char store[sizeof("12345678901234567890")];
char store[sizeof(" in 18446744073709551616 us.")];
unsigned int styleflags = 0;
if (query->lookup->trace || query->lookup->ns_search_only) {
@@ -338,10 +338,11 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
return (result);
check_result(result, "dns_rdata_totext");
if (query->lookup->identify) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname);
snprintf(store, 19, " in %d ms.", (int)diff/1000);
snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u ms.", diff / 1000);
ADD_STRING(buf, store);
}
ADD_STRING(buf, "\n");
+1 -1
View File
@@ -138,7 +138,7 @@ main(int argc, char **argv) {
if (isc_commandline_option != '?')
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
/* Falls into */
/* FALLTHROUGH */
case 'h':
/* Does not return. */
usage();
+1 -1
View File
@@ -299,7 +299,7 @@ main(int argc, char **argv) {
if (isc_commandline_option != '?')
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
/* Falls into */
/* FALLTHROUGH */
case 'h':
/* Does not return. */
usage();
+2 -2
View File
@@ -45,8 +45,8 @@ check_result(isc_result_t result, const char *message);
void
vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
void
version(const char *program);
ISC_PLATFORM_NORETURN_PRE void
version(const char *program) ISC_PLATFORM_NORETURN_POST;
void
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
+1
View File
@@ -163,6 +163,7 @@ bind9_getaddresses(const char *hostname, in_port_t port,
goto again;
}
#endif
/* FALLTHROUGH */
default:
return (ISC_R_FAILURE);
}
+1 -1
View File
@@ -131,7 +131,7 @@ check_node(dns_rdataset_t *rootns, dns_name_t *name,
case dns_rdatatype_ns:
if (dns_name_compare(name, dns_rootname) == 0)
break;
/*FALLTHROUGH*/
/* FALLTHROUGH */
default:
result = ISC_R_FAILURE;
goto cleanup;
+1 -1
View File
@@ -40,7 +40,7 @@ static const int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
isc_result_t
dns_time64_totext(isc_int64_t t, isc_buffer_t *target) {
struct tm tm;
char buf[sizeof("YYYYMMDDHHMMSS")];
char buf[sizeof("!!!!!!YYYY!!!!!!!!MM!!!!!!!!DD!!!!!!!!HH!!!!!!!!MM!!!!!!!!SS")];
int secs;
unsigned int l;
isc_region_t region;
+7 -7
View File
@@ -1546,7 +1546,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
update_log(log, zone, ISC_LOG_DEBUG(3),
"updated data signatures");
/*FALLTHROUGH*/
/* FALLTHROUGH */
case remove_orphaned:
state->state = remove_orphaned;
@@ -1579,7 +1579,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
update_log(log, zone, ISC_LOG_DEBUG(3),
"rebuilding NSEC chain");
/*FALLTHROUGH*/
/* FALLTHROUGH */
case build_chain:
state->state = build_chain;
/*
@@ -1667,7 +1667,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
CHECK(uniqify_name_list(&state->affected));
/*FALLTHROUGH*/
/* FALLTHROUGH */
case process_nsec:
state->state = process_nsec;
@@ -1784,7 +1784,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
update_log(log, zone, ISC_LOG_DEBUG(3),
"signing rebuilt NSEC chain");
/*FALLTHROUGH*/
/* FALLTHROUGH */
case sign_nsec:
state->state = sign_nsec;
/* Update RRSIG NSECs. */
@@ -1814,7 +1814,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
}
ISC_LIST_APPENDLIST(state->nsec_mindiff.tuples,
state->work.tuples, link);
/*FALLTHROUGH*/
/* FALLTHROUGH */
case update_nsec3:
state->state = update_nsec3;
@@ -1902,7 +1902,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
t = ISC_LIST_NEXT(t, link);
}
/*FALLTHROUGH*/
/* FALLTHROUGH */
case process_nsec3:
state->state = process_nsec3;
while ((t = ISC_LIST_HEAD(state->affected.tuples)) != NULL) {
@@ -1957,7 +1957,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
update_log(log, zone, ISC_LOG_DEBUG(3),
"signing rebuilt NSEC3 chain");
/*FALLTHROUGH*/
/* FALLTHROUGH */
case sign_nsec3:
state->state = sign_nsec3;
/* Update RRSIG NSEC3s. */
+1
View File
@@ -622,6 +622,7 @@ xfr_rr(dns_xfrin_ctx_t *xfr, dns_name_t *name, isc_uint32_t ttl,
case XFRST_IXFR_END:
FAIL(DNS_R_EXTRADATA);
/* NOTREACHED */
/* FALLTHROUGH */
default:
INSIST(0);
break;
+3 -1
View File
@@ -9063,6 +9063,7 @@ zone_maintenance(dns_zone_t *zone) {
case dns_zone_redirect:
if (zone->masters == NULL)
break;
/* FALLTHROUGH */
case dns_zone_slave:
case dns_zone_stub:
LOCK_ZONE(zone);
@@ -9084,6 +9085,7 @@ zone_maintenance(dns_zone_t *zone) {
case dns_zone_redirect:
if (zone->masters == NULL)
break;
/* FALLTHROUGH */
case dns_zone_slave:
case dns_zone_stub:
if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DIALREFRESH) &&
@@ -14101,7 +14103,7 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
switch (xfrresult) {
case ISC_R_SUCCESS:
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
/*FALLTHROUGH*/
/* FALLTHROUGH */
case DNS_R_UPTODATE:
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_FORCEXFER);
/*
+4
View File
@@ -331,9 +331,11 @@ entropypool_adddata(isc_entropy_t *ent, void *p, unsigned int len,
case 3:
val = *buf++;
len--;
/* FALLTHROUGH */
case 2:
val = val << 8 | *buf++;
len--;
/* FALLTHROUGH */
case 1:
val = val << 8 | *buf++;
len--;
@@ -354,8 +356,10 @@ entropypool_adddata(isc_entropy_t *ent, void *p, unsigned int len,
switch (len) {
case 3:
val = *buf++;
/* FALLTHROUGH */
case 2:
val = val << 8 | *buf++;
/* FALLTHROUGH */
case 1:
val = val << 8 | *buf++;
}
+1 -1
View File
@@ -639,7 +639,7 @@ isc__print_printf(void (*emit)(char, void *), void *arg,
#else
assert("long doubles are not supported" == NULL);
#endif
/*FALLTHROUGH*/
/* FALLTHROUGH */
case 'e':
case 'E':
case 'f':
+2 -2
View File
@@ -160,7 +160,7 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
INSIST(n == 2);
source->sources.usocket.status =
isc_usocketsource_wrote;
/*FALLTHROUGH*/
/* FALLTHROUGH */
case isc_usocketsource_wrote:
if (recvfrom(fd, buf, 1, 0, NULL, NULL) != 1) {
@@ -198,7 +198,7 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
source->sources.usocket.sz_to_recv = sz_to_recv;
if (sz_to_recv > sizeof(buf))
goto err;
/*FALLTHROUGH*/
/* FALLTHROUGH */
case isc_usocketsource_reading:
if (sz_to_recv != 0U) {
+2
View File
@@ -4879,6 +4879,8 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
break;
}
/* FALLTHROUGH */
case DOIO_HARD:
case DOIO_SUCCESS:
if ((flags & ISC_SOCKFLAG_IMMEDIATE) == 0)
+1 -1
View File
@@ -506,7 +506,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
#else
INSIST("long doubles are not supported" == NULL);
#endif
/*FALLTHROUGH*/
/* FALLTHROUGH */
case 'e':
case 'E':
case 'f':