qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] Drop more useless casts from void * to pointer


From: Laurent Vivier
Subject: Re: [PATCH 3/3] Drop more useless casts from void * to pointer
Date: Sat, 22 Oct 2022 23:07:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

Le 23/09/2022 à 14:00, Markus Armbruster a écrit :
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
  bsd-user/elfload.c                      | 2 +-
  contrib/plugins/cache.c                 | 8 ++++----
  contrib/vhost-user-blk/vhost-user-blk.c | 2 +-
  hw/core/qdev-clock.c                    | 2 +-
  hw/hyperv/vmbus.c                       | 2 +-
  hw/net/cadence_gem.c                    | 2 +-
  hw/net/virtio-net.c                     | 2 +-
  hw/nvme/ctrl.c                          | 4 ++--
  hw/rdma/vmw/pvrdma_cmd.c                | 9 +++------
  hw/rdma/vmw/pvrdma_qp_ops.c             | 6 +++---
  hw/virtio/virtio-iommu.c                | 3 +--
  linux-user/syscall.c                    | 2 +-
  target/i386/hax/hax-all.c               | 2 +-
  tests/tcg/aarch64/system/semiheap.c     | 4 ++--
  util/coroutine-ucontext.c               | 2 +-
  util/vfio-helpers.c                     | 2 +-
  16 files changed, 25 insertions(+), 29 deletions(-)

...
diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c
index ddc98fb4f8..31f586d366 100644
--- a/util/coroutine-ucontext.c
+++ b/util/coroutine-ucontext.c
@@ -105,7 +105,7 @@ void finish_switch_fiber(void *fake_stack_save)
      __sanitizer_finish_switch_fiber(fake_stack_save, &bottom_old, &size_old);
if (!leaderp->stack) {
-        leaderp->stack = (void *)bottom_old;
+        leaderp->stack = bottom_old;

bottom_old is "const void *" and stack is "void *", I think compiler will complain we discard the "const" qualifier.

Otherwise:

Reviewed-by: Laurent Vivier <laurent@vivier.eu>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]