Skip to content

Commit

Permalink
Fix build with clang v15.0.6 [-Wunused-but-set-variable] (squid-cache…
Browse files Browse the repository at this point in the history
…#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]`
  • Loading branch information
kinkie authored and squidadm committed Feb 23, 2023
1 parent 641c0c8 commit 11bc443
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/icmp/net_db.cc
Expand Up @@ -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);

Expand All @@ -250,8 +249,6 @@ netdbPurgeLRU(void)
break;

netdbRelease(*(list + k));

++removed;
}

xfree(list);
Expand Down

0 comments on commit 11bc443

Please sign in to comment.