virtio: Use __diagused for variables only used in KASSERT().

This commit is contained in:
John Baldwin 2022-04-13 16:08:19 -07:00
parent 3fbf4ca60b
commit b25ddb782f
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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) {