git: 462b25270e3c - stable/15 - ipfilter: remove unused variable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Sep 2026 14:21:47 UTC
The branch stable/15 has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=462b25270e3c8230054201a27f23cd767c270f15
commit 462b25270e3c8230054201a27f23cd767c270f15
Author: Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-09 17:14:45 +0000
Commit: Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-14 14:02:36 +0000
ipfilter: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].
[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused
Reviewed by: cy
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 94f7019668f8a02416c5b32ba8a9c32a68edd261)
---
sys/netpfil/ipfilter/netinet/ip_nat.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c
index 9ee1c5d24ed1..b7f5eb94b1dd 100644
--- a/sys/netpfil/ipfilter/netinet/ip_nat.c
+++ b/sys/netpfil/ipfilter/netinet/ip_nat.c
@@ -5807,14 +5807,13 @@ ipf_nat_expire(ipf_main_softc_t *softc)
ipf_nat_softc_t *softn = softc->ipf_nat_soft;
ipftq_t *ifq, *ifqnext;
ipftqent_t *tqe, *tqn;
- int i;
SPL_INT(s);
SPL_NET(s);
WRITE_ENTER(&softc->ipf_nat);
- for (ifq = softn->ipf_nat_tcptq, i = 0; ifq != NULL;
+ for (ifq = softn->ipf_nat_tcptq; ifq != NULL;
ifq = ifq->ifq_next) {
- for (tqn = ifq->ifq_head; ((tqe = tqn) != NULL); i++) {
+ for (tqn = ifq->ifq_head; (tqe = tqn) != NULL;) {
if (tqe->tqe_die > softc->ipf_ticks)
break;
tqn = tqe->tqe_next;
@@ -5823,7 +5822,7 @@ ipf_nat_expire(ipf_main_softc_t *softc)
}
for (ifq = softn->ipf_nat_utqe; ifq != NULL; ifq = ifq->ifq_next) {
- for (tqn = ifq->ifq_head; ((tqe = tqn) != NULL); i++) {
+ for (tqn = ifq->ifq_head; (tqe = tqn) != NULL;) {
if (tqe->tqe_die > softc->ipf_ticks)
break;
tqn = tqe->tqe_next;