fix: dev: fix clang-scan 19 warnings

Silence warnings generated by clang-scan.

Merge branch 'each-clang-scan-errors-bind-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9388
This commit is contained in:
Evan Hunt 2024-08-22 05:29:09 +00:00
commit 01ee251d13
5 changed files with 9 additions and 5 deletions

View file

@ -3079,7 +3079,7 @@ void
dig_shutdown(void) {
destroy_lookup(default_lookup);
if (atomic_load(&batchname) != 0) {
if (batchfp != stdin) {
if (batchfp != NULL && batchfp != stdin) {
fclose(batchfp);
}
atomic_store(&batchname, 0);

View file

@ -424,9 +424,10 @@ start_tcp_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock,
csock->fd = isc__nm_tcp_lb_socket(mgr,
iface->type.sa.sa_family);
} else {
INSIST(fd >= 0);
csock->fd = dup(fd);
}
REQUIRE(csock->fd >= 0);
INSIST(csock->fd >= 0);
ievent = isc__nm_get_netievent_tcplisten(mgr, csock);
isc__nm_maybe_enqueue_ievent(&mgr->workers[tid],

View file

@ -397,9 +397,10 @@ start_tcpdns_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock,
csock->fd = isc__nm_tcpdns_lb_socket(mgr,
iface->type.sa.sa_family);
} else {
INSIST(fd >= 0);
csock->fd = dup(fd);
}
REQUIRE(csock->fd >= 0);
INSIST(csock->fd >= 0);
ievent = isc__nm_get_netievent_tcpdnslisten(mgr, csock);
isc__nm_maybe_enqueue_ievent(&mgr->workers[tid],

View file

@ -501,9 +501,10 @@ start_tlsdns_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock,
csock->fd = isc__nm_tlsdns_lb_socket(mgr,
iface->type.sa.sa_family);
} else {
INSIST(fd >= 0);
csock->fd = dup(fd);
}
REQUIRE(csock->fd >= 0);
INSIST(csock->fd >= 0);
ievent = isc__nm_get_netievent_tlsdnslisten(mgr, csock);
isc__nm_maybe_enqueue_ievent(&mgr->workers[tid],

View file

@ -129,9 +129,10 @@ start_udp_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock,
csock->fd = isc__nm_udp_lb_socket(mgr,
iface->type.sa.sa_family);
} else {
INSIST(fd >= 0);
csock->fd = dup(fd);
}
REQUIRE(csock->fd >= 0);
INSIST(csock->fd >= 0);
ievent = isc__nm_get_netievent_udplisten(mgr, csock);
isc__nm_maybe_enqueue_ievent(&mgr->workers[tid],