qemu-trivial
[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: Markus Armbruster
Subject: Re: [PATCH 3/3] Drop more useless casts from void * to pointer
Date: Wed, 23 Nov 2022 14:24:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Laurent Vivier <laurent@vivier.eu> writes:

> 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.

You're right.

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

Thanks!




reply via email to

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