diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2025-07-17 17:08:00 +0200 |
|---|---|---|
| committer | Jason Wang <jasowang@redhat.com> | 2025-07-21 10:21:57 +0800 |
| commit | 2ed74e3c005f236acbf7d85d396a653bfb004a17 (patch) | |
| tree | d7ef0190aaa3e096230d1281b976741764da8aab | |
| parent | a6d6e37901551cbd61b0a61c6bab5745fb1833ff (diff) | |
| download | focaccia-qemu-2ed74e3c005f236acbf7d85d396a653bfb004a17.tar.gz focaccia-qemu-2ed74e3c005f236acbf7d85d396a653bfb004a17.zip | |
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 <lvivier@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
| -rw-r--r-- | net/passt.c | 5 |
1 files changed, 0 insertions, 5 deletions
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) |