From: Laurent Vivier Date: Thu, 17 Jul 2025 15:08:00 +0000 (+0200) Subject: net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375) X-Git-Tag: v10.1.0-rc0~8^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ed74e3c005f236acbf7d85d396a653bfb004a17;p=thirdparty%2Fqemu.git net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375) 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 Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- diff --git a/net/passt.c b/net/passt.c index 6f616ba3c2..9cd5b3e6f2 100644 --- a/net/passt.c +++ b/net/passt.c @@ -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)