From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: "Markus Armbruster" <armbru@redhat.com>,
qemu-devel@nongnu.org, "Alberto Garcia" <berto@igalia.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Ani Sinha" <anisinha@redhat.com>,
"Brian Cain" <bcain@quicinc.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Daniel P. Berrange" <berrange@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Eric Auger" <eric.auger@redhat.com>,
"Eric Blake" <eblake@redhat.com>, "Fam Zheng" <fam@euphon.net>,
"Fan Ni" <fan.ni@samsung.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Joel Stanley" <joel@jms.id.au>,
"Jonathan Cameron" <jonathan.cameron@huawei.com>,
"Keith Busch" <kbusch@kernel.org>,
"Klaus Jensen" <its@irrelevant.dk>,
"Laurent Vivier" <laurent@vivier.eu>,
"Laurent Vivier" <lvivier@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Peter Xu" <peterx@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Song Gao" <gaosong@loongson.cn>,
"Thomas Huth" <thuth@redhat.com>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
"Xiaojuan Yang" <yangxiaojuan@loongson.cn>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: Help wanted for enabling -Wshadow=local
Date: Fri, 22 Sep 2023 14:43:30 -0300 [thread overview]
Message-ID: <f7fca6b0-ed28-8f72-e960-f73f2bc8fcbe@gmail.com> (raw)
In-Reply-To: <87r0mqlf9x.fsf@pond.sub.org>
Markus,
Can you publish your branch with the current -Wshadow=local patches in
gitlab/github? I'm hitting (and fixing) a lot of errors that aren't listed
here, meaning they're either fixed already in your local branch or needs to
be fixed.
Thanks,
Daniel
On 9/22/23 06:37, Markus Armbruster wrote:
> If you are in To:, we need your help to enable -Wshadow=local.
>
> Local variables shadowing other local variables or parameters make the
> code needlessly hard to understand. Bugs love to hide in such code.
> Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail
> on polling error".
>
> Enabling -Wshadow would prevent bugs like this one. But we have to
> clean up all the offenders first.
>
> I collected the patches posted so far:
>
> [PATCH v3 0/7] Steps towards enabling -Wshadow=local
> Message-ID: <20230921121312.1301864-1-armbru@redhat.com>
>
> [PATCH v2 00/22] (few more) Steps towards enabling -Wshadow
> Message-ID: <20230904161235.84651-1-philmd@linaro.org>
>
> [PATCH 0/3] (few more) Steps towards enabling -Wshadow [3 more]
> Message-ID: <20230904162824.85385-1-philmd@linaro.org>
>
> [PATCH 0/8] ppc: Clean up local variable shadowing
> Message-ID: <20230918145850.241074-1-clg@kaod.org>
>
> Thanks, Philippe & Cedric!
>
> In my local build with -Wshadow=local, warnings remain in just 56 files.
>
> Sorted by subsystems, files covered by multiple subsystems marked
> "(*NUMBER*)", files not covered in MAINTAINERS marked (*guess*):
>
> Guest CPU cores (TCG)
> ---------------------
> ARM TCG CPUs
> M: Peter Maydell <peter.maydell@linaro.org>
> hw/arm/smmuv3-internal.h(*2*)
> hw/arm/smmuv3.c(*2*)
>
> ARM SMMU
> M: Eric Auger <eric.auger@redhat.com>
> hw/arm/smmuv3-internal.h(*2*)
> hw/arm/smmuv3.c(*2*)
>
> Hexagon TCG CPUs
> M: Brian Cain <bcain@quicinc.com>
> target/hexagon/gen_helper_funcs.py
> target/hexagon/mmvec/macros.h
> target/hexagon/op_helper.c
> target/hexagon/translate.c
>
> M68K TCG CPUs
> M: Laurent Vivier <laurent@vivier.eu>
> disas/m68k.c
>
> PowerPC TCG CPUs
> M: Nicholas Piggin <npiggin@gmail.com>
> M: Daniel Henrique Barboza <danielhb413@gmail.com>
> R: Cédric Le Goater <clg@kaod.org>
> target/ppc/int_helper.c
>
> RISC-V TCG CPUs
> hw/riscv/opentitan.c(*2*)
> target/riscv/cpu.c
> target/riscv/vector_helper.c
>
> X86 TCG CPUs
> M: Paolo Bonzini <pbonzini@redhat.com>
> M: Richard Henderson <richard.henderson@linaro.org>
> M: Eduardo Habkost <eduardo@habkost.net>
> hw/i386/acpi-build.c(*3*)
> hw/i386/acpi-microvm.c(*2*)
> hw/i386/intel_iommu.c(*3*)
> hw/i386/pc.c(*2*)
> hw/i386/x86.c(*2*)
> target/i386/cpu.c(*guess*)
> target/i386/tcg/seg_helper.c
> target/i386/tcg/sysemu/svm_helper.c
> target/i386/tcg/translate.c
>
> Guest CPU Cores (KVM)
> ---------------------
> X86 KVM CPUs
> M: Paolo Bonzini <pbonzini@redhat.com>
> M: Marcelo Tosatti <mtosatti@redhat.com>
> target/i386/kvm/kvm.c
>
> ARM Machines
> ------------
> ARM cores
> M: Peter Maydell <peter.maydell@linaro.org>
> hw/intc/arm_gicv3_its.c
>
> Versatile PB
> M: Peter Maydell <peter.maydell@linaro.org>
> hw/misc/arm_sysctl.c
>
> ASPEED BMCs
> M: Cédric Le Goater <clg@kaod.org>
> M: Peter Maydell <peter.maydell@linaro.org>
> R: Andrew Jeffery <andrew@aj.id.au>
> R: Joel Stanley <joel@jms.id.au>
> hw/i2c/aspeed_i2c.c
> hw/misc/aspeed_i3c.c
>
> LoongArch Machines
> ------------------
> Virt
> M: Xiaojuan Yang <yangxiaojuan@loongson.cn>
> M: Song Gao <gaosong@loongson.cn>
> hw/loongarch/virt.c
>
> RISC-V Machines
> ---------------
> OpenTitan
> M: Alistair Francis <Alistair.Francis@wdc.com>
> hw/riscv/opentitan.c(*2*)
>
> X86 Machines
> ------------
> PC
> M: Michael S. Tsirkin <mst@redhat.com>
> M: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> hw/i386/acpi-build.c(*3*)
> hw/i386/acpi-microvm.c(*2*)
> hw/i386/intel_iommu.c(*3*)
> hw/i386/pc.c(*2*)
> hw/i386/x86.c(*2*)
>
> PC Chipset
> M: Michael S. Tsirkin <mst@redhat.com>
> M: Paolo Bonzini <pbonzini@redhat.com>
> hw/i2c/pm_smbus.c
>
> Devices
> -------
> ACPI/SMBIOS
> M: Michael S. Tsirkin <mst@redhat.com>
> M: Igor Mammedov <imammedo@redhat.com>
> R: Ani Sinha <anisinha@redhat.com>
> hw/acpi/cpu_hotplug.c
> hw/i386/acpi-build.c(*3*)
> hw/smbios/smbios.c
>
> Network devices
> M: Jason Wang <jasowang@redhat.com>
> hw/net/vhost_net.c(*2*)
>
> SCSI
> M: Paolo Bonzini <pbonzini@redhat.com>
> R: Fam Zheng <fam@euphon.net>
> hw/scsi/mptsas.c
>
> USB
> M: Gerd Hoffmann <kraxel@redhat.com>
> hw/usb/desc.c
> hw/usb/dev-hub.c
> hw/usb/dev-storage.c
> hw/usb/hcd-xhci.c
> hw/usb/host-libusb.c
>
> vhost
> M: Michael S. Tsirkin <mst@redhat.com>
> contrib/vhost-user-gpu/vhost-user-gpu.c(*2*)
> contrib/vhost-user-gpu/vugpu.h(*2*)
> hw/net/vhost_net.c(*2*)
> hw/virtio/vhost.c
>
> virtio
> M: Michael S. Tsirkin <mst@redhat.com>
> hw/virtio/virtio-pci.c
> include/hw/virtio/virtio-gpu.h(*2*)
>
> nvme
> M: Keith Busch <kbusch@kernel.org>
> M: Klaus Jensen <its@irrelevant.dk>
> hw/nvme/ns.c
>
> virtio-gpu
> M: Gerd Hoffmann <kraxel@redhat.com>
> include/hw/virtio/virtio-gpu.h(*2*)
>
> vhost-user-gpu
> M: Marc-André Lureau <marcandre.lureau@redhat.com>
> R: Gerd Hoffmann <kraxel@redhat.com>
> contrib/vhost-user-gpu/vhost-user-gpu.c(*2*)
> contrib/vhost-user-gpu/vugpu.h(*2*)
>
> Subsystems
> ----------
> Overall Audio backends
> M: Gerd Hoffmann <kraxel@redhat.com>
> M: Marc-André Lureau <marcandre.lureau@redhat.com>
> audio/audio.c
>
> Open Sound System (OSS) Audio backend
> M: Gerd Hoffmann <kraxel@redhat.com>
> audio/ossaudio.c
>
> Compute Express Link
> M: Jonathan Cameron <jonathan.cameron@huawei.com>
> R: Fan Ni <fan.ni@samsung.com>
> include/hw/cxl/cxl_device.h
>
> Device Tree
> M: Alistair Francis <alistair.francis@wdc.com>
> R: David Gibson <david@gibson.dropbear.id.au>
> softmmu/device_tree.c
>
> Dump
> M: Marc-André Lureau <marcandre.lureau@redhat.com>
> dump/dump.c
>
> Main loop
> M: Paolo Bonzini <pbonzini@redhat.com>
> softmmu/vl.c
>
> qtest
> M: Thomas Huth <thuth@redhat.com>
> M: Laurent Vivier <lvivier@redhat.com>
> R: Paolo Bonzini <pbonzini@redhat.com>
> tests/qtest/m48t59-test.c
>
> Seccomp
> M: Daniel P. Berrange <berrange@redhat.com>
> softmmu/qemu-seccomp.c
>
> Cryptography
> M: Daniel P. Berrange <berrange@redhat.com>
> crypto/tls-cipher-suites.c
>
> Throttling infrastructure
> M: Alberto Garcia <berto@igalia.com>
> tests/unit/test-throttle.c
>
> VT-d Emulation
> M: Michael S. Tsirkin <mst@redhat.com>
> M: Peter Xu <peterx@redhat.com>
> R: Jason Wang <jasowang@redhat.com>
> hw/i386/intel_iommu.c(*3*)
>
> Usermode Emulation
> ------------------
> Linux user
> M: Laurent Vivier <laurent@vivier.eu>
> linux-user/flatload.c
> linux-user/mmap.c
> linux-user/syscall.c
>
> Block drivers
> -------------
> Network Block Device (NBD)
> M: Eric Blake <eblake@redhat.com>
> M: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> qemu-nbd.c
>
next prev parent reply other threads:[~2023-09-22 17:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 9:37 Help wanted for enabling -Wshadow=local Markus Armbruster
2023-09-22 10:33 ` Ani Sinha
2023-09-22 10:36 ` Michael S. Tsirkin
2023-09-22 11:25 ` Markus Armbruster
2023-09-22 14:03 ` Peter Maydell
2023-09-22 15:26 ` Markus Armbruster
2023-09-22 15:31 ` Markus Armbruster
2023-09-22 16:32 ` Daniel Henrique Barboza
2023-09-22 17:00 ` Ani Sinha
2023-09-22 17:43 ` Daniel Henrique Barboza [this message]
2023-09-22 17:48 ` Peter Maydell
2023-09-22 18:59 ` Warner Losh
2023-09-23 12:33 ` Peter Maydell
2023-09-25 16:37 ` Warner Losh
2023-09-23 6:10 ` Markus Armbruster
2023-09-23 7:22 ` Markus Armbruster
2023-09-25 11:47 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7fca6b0-ed28-8f72-e960-f73f2bc8fcbe@gmail.com \
--to=danielhb413@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=andrew@aj.id.au \
--cc=anisinha@redhat.com \
--cc=armbru@redhat.com \
--cc=bcain@quicinc.com \
--cc=berrange@redhat.com \
--cc=berto@igalia.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=eric.auger@redhat.com \
--cc=fam@euphon.net \
--cc=fan.ni@samsung.com \
--cc=gaosong@loongson.cn \
--cc=imammedo@redhat.com \
--cc=its@irrelevant.dk \
--cc=jasowang@redhat.com \
--cc=joel@jms.id.au \
--cc=jonathan.cameron@huawei.com \
--cc=kbusch@kernel.org \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
--cc=yangxiaojuan@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).