From: gkinkie@gmail.com Date: Fri, 27 Jan 2023 14:43:41 +0000 (+0000) Subject: Fix build with clang v15.0.6 [-Wunused-but-set-variable] (#1247) X-Git-Tag: SQUID_6_0_1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d09e3b5f90ebcfbe2d16880d34e9fc7db61fa0;p=thirdparty%2Fsquid.git Fix build with clang v15.0.6 [-Wunused-but-set-variable] (#1247) 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]` --- diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index 84bb50bd84..30865aaf34 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -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);