]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix build with clang v15.0.6 [-Wunused-but-set-variable] (#1247)
authorgkinkie@gmail.com <kinkie@squid-cache.org>
Fri, 27 Jan 2023 14:43:41 +0000 (14:43 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 27 Jan 2023 14:43:50 +0000 (14:43 +0000)
clang v15.0.6 distributed with Fedora Rawhide complains about a variable
that is updated but never used:

    net_db.cc:230:9: error: variable 'removed' set but not used
    [-Werror,-Wunused-but-set-variable]`

src/icmp/net_db.cc

index 84bb50bd845a742ad9768c4f226a882b98373de2..30865aaf34d863bbef32d212f5a6f8a872e3625e 100644 (file)
@@ -227,7 +227,6 @@ netdbPurgeLRU(void)
     netdbEntry **list;
     int k = 0;
     int list_count = 0;
-    int removed = 0;
     list = (netdbEntry **)xcalloc(netdbEntry::UseCount(), sizeof(netdbEntry *));
     hash_first(addr_table);
 
@@ -247,8 +246,6 @@ netdbPurgeLRU(void)
             break;
 
         netdbRelease(*(list + k));
-
-        ++removed;
     }
 
     xfree(list);