[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qemu-nbd: changes towards enabling -Wshadow=local
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] qemu-nbd: changes towards enabling -Wshadow=local |
Date: |
Mon, 25 Sep 2023 09:53:55 +0100 |
User-agent: |
Mutt/2.2.9 (2022-11-12) |
On Fri, Sep 22, 2023 at 03:50:20PM -0500, Eric Blake wrote:
> Address all compiler complaints from -Wshadow in qemu-nbd. Several
> instances of 'int ret' became shadows when commit 4fbec260 added 'ret'
> at a higher scope in main. More interesting was the 'void *ret'
> capturing the result of a pthread; where we were conceptually doing
> '(void*)(intptr_t)EXIT_FAILURE != NULL' which just feels wrong (even
> though it happens to compile correctly), so it was worth a better
> cleanup.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>
> I'm happy to let Markus collect this with the growing pile on
> shadow-next, instead of going through my NBD tree.
>
> qemu-nbd.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|