aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-21 19:19:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-21 19:19:39 +0000
commit0294e95da4aa272906d4472137b1235d8d8a7180 (patch)
treeab25ae7071289a164def41660841623ec3ae6949
parentfa267a329ffa3d0e02c3c3a52dd5df5231d92cba (diff)
downloadsrc-0294e95da4aa272906d4472137b1235d8d8a7180.tar.gz
src-0294e95da4aa272906d4472137b1235d8d8a7180.zip
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
-rw-r--r--sys/net/iflib.c3
1 files changed, 1 insertions, 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;