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_5_8~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dff06676e8acec5f864a547cf25292226ade534;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 4f1755b6a5..fa852f6c5d 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -230,7 +230,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); @@ -250,8 +249,6 @@ netdbPurgeLRU(void) break; netdbRelease(*(list + k)); - - ++removed; } xfree(list);