git: 63d78df8d304 - stable/14 - ipfilter: remove unused variable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Sep 2026 14:47:20 UTC
The branch stable/14 has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=63d78df8d304b7ab3333b10736cf8f9410bea9fa
commit 63d78df8d304b7ab3333b10736cf8f9410bea9fa
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:32:22 +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 86e32b3bf750..b021657134cd 100644
--- a/sys/netpfil/ipfilter/netinet/ip_nat.c
+++ b/sys/netpfil/ipfilter/netinet/ip_nat.c
@@ -5811,14 +5811,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;
@@ -5827,7 +5826,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;