The branch main has been updated by siva:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=94f7019668f8a02416c5b32ba8a9c32a68edd261

commit 94f7019668f8a02416c5b32ba8a9c32a68edd261
Author:     Siva Mahadevan <[email protected]>
AuthorDate: 2026-09-09 17:14:45 +0000
Commit:     Siva Mahadevan <[email protected]>
CommitDate: 2026-09-10 14:34:56 +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
---
 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;

Reply via email to