From c46e1f290c1678a5707f07f455aa6485d5b05b8e Mon Sep 17 00:00:00 2001 From: dv Date: Wed, 3 Jan 2024 03:14:16 +0000 Subject: [PATCH] vmd(8): remove unused variable from vionet_notify_tx. num_enq was assigned and incremented, but never used. clang started pointing out via warnings. No functional change. --- usr.sbin/vmd/vionet.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/vmd/vionet.c b/usr.sbin/vmd/vionet.c index 740296a125e..810adde2e88 100644 --- a/usr.sbin/vmd/vionet.c +++ b/usr.sbin/vmd/vionet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vionet.c,v 1.6 2023/09/26 01:53:54 dv Exp $ */ +/* $OpenBSD: vionet.c,v 1.7 2024/01/03 03:14:16 dv Exp $ */ /* * Copyright (c) 2023 Dave Voutila @@ -506,7 +506,7 @@ vionet_notify_tx(struct virtio_dev *dev) uint16_t idx, pkt_desc_idx, hdr_desc_idx, dxx, cnt; size_t pktsz, chunk_size = 0; ssize_t dhcpsz = 0; - int num_enq, ofs, spc = 0; + int ofs, spc = 0; char *vr = NULL, *pkt = NULL, *dhcppkt = NULL; struct vionet_dev *vionet = &dev->vionet; struct vring_desc *desc, *pkt_desc, *hdr_desc; @@ -531,8 +531,6 @@ vionet_notify_tx(struct virtio_dev *dev) avail = (struct vring_avail *)(vr + vq_info->vq_availoffset); used = (struct vring_used *)(vr + vq_info->vq_usedoffset); - num_enq = 0; - idx = vq_info->last_avail & VIONET_QUEUE_MASK; if ((avail->idx & VIONET_QUEUE_MASK) == idx) @@ -662,8 +660,6 @@ vionet_notify_tx(struct virtio_dev *dev) vq_info->last_avail = avail->idx & VIONET_QUEUE_MASK; idx = (idx + 1) & VIONET_QUEUE_MASK; - num_enq++; - free(pkt); pkt = NULL; } -- 2.20.1