]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix unbound dnstap socket test program analyzer warnings about
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 30 Sep 2024 14:36:01 +0000 (16:36 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 30 Sep 2024 14:36:01 +0000 (16:36 +0200)
  unused variable assignments and variable initialization.

dnstap/unbound-dnstap-socket.c
doc/Changelog

index f203aa7d73a16a1ad9fb08c760e67a56992583b0..b6b993d540943727fa57f401fd39f51af36aae53 100644 (file)
@@ -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
index 885ac55a75a4fa0288c81f3c12c1ff70c89730b5..c675dcb8c4159e0e95b691a4e855ae9869f8da9a 100644 (file)
@@ -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.