]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
negotiate_kerberos_auth: Fix build [-Wunused-but-set-variable] (#1294)
authorgkinkie@gmail.com <kinkie@squid-cache.org>
Thu, 2 Mar 2023 23:50:10 +0000 (23:50 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 4 Mar 2023 00:03:39 +0000 (00:03 +0000)
Unused variable discovered by clang v15.

src/auth/negotiate/kerberos/negotiate_kerberos_auth.cc

index 4cce9264f4dae84e6a6ae198ee86bb7698351255..474c836b44a7acaabbe66d5050cce9f387db26ea 100644 (file)
@@ -95,7 +95,7 @@ gethost_name(void)
      */
     char hostname[1024];
     struct addrinfo *hres = nullptr, *hres_list;
-    int rc, count;
+    int rc;
 
     rc = gethostname(hostname, sizeof(hostname)-1);
     if (rc) {
@@ -114,9 +114,7 @@ gethost_name(void)
         return nullptr;
     }
     hres_list = hres;
-    count = 0;
     while (hres_list) {
-        ++count;
         hres_list = hres_list->ai_next;
     }
     rc = getnameinfo(hres->ai_addr, hres->ai_addrlen, hostname,