From: W.C.A. Wijngaards Date: Mon, 30 Sep 2024 14:36:01 +0000 (+0200) Subject: - Fix unbound dnstap socket test program analyzer warnings about X-Git-Tag: release-1.22.0rc1~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bb3b9cc83696fd4caf8a1f1c29fefcc9d47b1c7;p=thirdparty%2Funbound.git - Fix unbound dnstap socket test program analyzer warnings about unused variable assignments and variable initialization. --- diff --git a/dnstap/unbound-dnstap-socket.c b/dnstap/unbound-dnstap-socket.c index f203aa7d7..b6b993d54 100644 --- a/dnstap/unbound-dnstap-socket.c +++ b/dnstap/unbound-dnstap-socket.c @@ -1151,7 +1151,9 @@ void dtio_mainfdcallback(int fd, short ATTR_UNUSED(bits), void* arg) char* id = NULL; struct sockaddr_storage addr; socklen_t addrlen = (socklen_t)sizeof(addr); - int s = accept(fd, (struct sockaddr*)&addr, &addrlen); + int s; + memset(&addr, 0, sizeof(addr)); + s = accept(fd, (struct sockaddr*)&addr, &addrlen); if(s == -1) { #ifndef USE_WINSOCK /* EINTR is signal interrupt. others are closed connection. */ @@ -1543,8 +1545,8 @@ int main(int argc, char** argv) usage(argv); } } - argc -= optind; - argv += optind; + /* argc -= optind; not using further arguments */ + /* argv += optind; not using further arguments */ if(usessl) { #ifdef HAVE_SSL diff --git a/doc/Changelog b/doc/Changelog index 885ac55a7..c675dcb8c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ 30 September 2024: Wouter - Fix negative cache NSEC3 parameter compares for zero length NSEC3 salt. + - Fix unbound dnstap socket test program analyzer warnings about + unused variable assignments and variable initialization. 25 September 2024: Wouter - Fix #1144: [FR] log timestamps in ISO8601 format with timezone.