[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/56] util/vhost-user-server: Clean up local variable shadowing
From: |
Markus Armbruster |
Subject: |
[PULL 22/56] util/vhost-user-server: Clean up local variable shadowing |
Date: |
Fri, 29 Sep 2023 10:50:19 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Fix:
util/vhost-user-server.c: In function ‘set_watch’:
util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’
shadows a previous local [-Wshadow=compatible-local]
274 | VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1);
| ^~~~~~~~~~~
util/vhost-user-server.c:271:16: note: shadowed declaration is here
271 | VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd);
| ^~~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904161235.84651-18-philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
util/vhost-user-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c
index b4b6bf30a2..5ccc6d24a0 100644
--- a/util/vhost-user-server.c
+++ b/util/vhost-user-server.c
@@ -278,7 +278,7 @@ set_watch(VuDev *vu_dev, int fd, int vu_evt,
VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd);
if (!vu_fd_watch) {
- VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1);
+ vu_fd_watch = g_new0(VuFdWatch, 1);
QTAILQ_INSERT_TAIL(&server->vu_fd_watches, vu_fd_watch, next);
--
2.41.0
- [PULL 01/56] migration/rdma: Fix save_page method to fail on polling error, (continued)
- [PULL 01/56] migration/rdma: Fix save_page method to fail on polling error, Markus Armbruster, 2023/09/29
- [PULL 08/56] tcg: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 07/56] qobject atomics osdep: Make a few macros more hygienic, Markus Armbruster, 2023/09/29
- [PULL 03/56] ui: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 28/56] hw/intc/openpic: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 30/56] pnv/psi: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 18/56] hw/microblaze: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 19/56] hw/nios2: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 14/56] hw/arm/armv7m: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 06/56] block: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 22/56] util/vhost-user-server: Clean up local variable shadowing,
Markus Armbruster <=
- [PULL 31/56] spapr: Clean up local variable shadowing in spapr_dt_cpus(), Markus Armbruster, 2023/09/29
- [PULL 45/56] aspeed/i3c: Rename variable shadowing a local, Markus Armbruster, 2023/09/29
- [PULL 05/56] block/vdi: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 11/56] target/mips: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 15/56] hw/arm/virt: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 09/56] target/arm/tcg: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 04/56] block/dirty-bitmap: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 02/56] migration: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 49/56] seccomp: avoid shadowing of 'action' variable, Markus Armbruster, 2023/09/29
- [PULL 47/56] intel_iommu: Fix shadow local variables on "size", Markus Armbruster, 2023/09/29