]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375)
authorLaurent Vivier <lvivier@redhat.com>
Thu, 17 Jul 2025 15:08:00 +0000 (17:08 +0200)
committerJason Wang <jasowang@redhat.com>
Mon, 21 Jul 2025 02:21:57 +0000 (10:21 +0800)
The "err" variable was declared but never used within the
passt_vhost_user_event() function. This resulted in a dead code
warning (CID 1612375) from Coverity.

Remove the unused variable and the associated error block
to resolve the issue.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/passt.c

index 6f616ba3c2583adfc71918d1648ba2c8dc94651f..9cd5b3e6f2af90f0db140d86e6cd7048bb42f1f1 100644 (file)
@@ -397,7 +397,6 @@ err:
 static void passt_vhost_user_event(void *opaque, QEMUChrEvent event)
 {
     NetPasstState *s = opaque;
-    Error *err = NULL;
 
     switch (event) {
     case CHR_EVENT_OPENED:
@@ -428,10 +427,6 @@ static void passt_vhost_user_event(void *opaque, QEMUChrEvent event)
         /* Ignore */
         break;
     }
-
-    if (err) {
-        error_report_err(err);
-    }
 }
 
 static int net_passt_vhost_user_init(NetPasstState *s, Error **errp)