The branch main has been updated by dim:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0294e95da4aa272906d4472137b1235d8d8a7180

commit 0294e95da4aa272906d4472137b1235d8d8a7180
Author:     Dimitry Andric <[email protected]>
AuthorDate: 2022-07-21 19:19:28 +0000
Commit:     Dimitry Andric <[email protected]>
CommitDate: 2022-07-21 19:19:39 +0000

    Fix unused variable warning in iflib.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/net/iflib.c:993:8: error: variable 'n' set but not used 
[-Werror,-Wunused-but-set-variable]
                u_int n;
                      ^
    
    The 'n' variable appears to have been a debugging aid that has never
    been used for anything, so remove it.
    
    MFC after:      3 days
---
 sys/net/iflib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index d088571b09c0..b7a96eb3dde5 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -990,7 +990,6 @@ iflib_netmap_txsync(struct netmap_kring *kring, int flags)
        struct netmap_ring *ring = kring->ring;
        u_int nm_i;     /* index into the netmap kring */
        u_int nic_i;    /* index into the NIC ring */
-       u_int n;
        u_int const lim = kring->nkr_num_slots - 1;
        u_int const head = kring->rhead;
        struct if_pkt_info pi;
@@ -1043,7 +1042,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int flags)
                __builtin_prefetch(&txq->ift_sds.ifsd_m[nic_i]);
                __builtin_prefetch(&txq->ift_sds.ifsd_map[nic_i]);
 
-               for (n = 0; nm_i != head; n++) {
+               while (nm_i != head) {
                        struct netmap_slot *slot = &ring->slot[nm_i];
                        uint64_t offset = nm_get_offset(kring, slot);
                        u_int len = slot->len;

Reply via email to