Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2022 23:09:09 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b25ddb782fd7 - main - virtio: Use __diagused for variables only used in KASSERT().
Message-ID:  <202204132309.23DN99Yx074005@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

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

commit b25ddb782fd75b262b652fdcea9f8af90669e003
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-13 23:08:19 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-13 23:08:19 +0000

    virtio: Use __diagused for variables only used in KASSERT().
---
 sys/dev/virtio/balloon/virtio_balloon.c | 2 +-
 sys/dev/virtio/scsi/virtio_scsi.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/virtio/balloon/virtio_balloon.c b/sys/dev/virtio/balloon/virtio_balloon.c
index bf4e5cf916f7..966a715f7989 100644
--- a/sys/dev/virtio/balloon/virtio_balloon.c
+++ b/sys/dev/virtio/balloon/virtio_balloon.c
@@ -413,7 +413,7 @@ vtballoon_send_page_frames(struct vtballoon_softc *sc, struct virtqueue *vq,
 	struct sglist sg;
 	struct sglist_seg segs[1];
 	void *c;
-	int error;
+	int error __diagused;
 
 	sglist_init(&sg, 1, segs);
 
diff --git a/sys/dev/virtio/scsi/virtio_scsi.c b/sys/dev/virtio/scsi/virtio_scsi.c
index adf4fd17fc5b..d152e3273659 100644
--- a/sys/dev/virtio/scsi/virtio_scsi.c
+++ b/sys/dev/virtio/scsi/virtio_scsi.c
@@ -1795,7 +1795,7 @@ vtscsi_transport_reset_event(struct vtscsi_softc *sc,
 static void
 vtscsi_handle_event(struct vtscsi_softc *sc, struct virtio_scsi_event *event)
 {
-	int error;
+	int error __diagused;
 
 	if ((event->event & VIRTIO_SCSI_T_EVENTS_MISSED) == 0) {
 		switch (event->event) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204132309.23DN99Yx074005>