qemu-devel
[Top][All Lists]
Advanced

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

Re: Help wanted for enabling -Wshadow=local


From: Peter Maydell
Subject: Re: Help wanted for enabling -Wshadow=local
Date: Fri, 22 Sep 2023 15:03:50 +0100

On Fri, 22 Sept 2023 at 10:37, Markus Armbruster <armbru@redhat.com> 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.

Do you have either a git branch with those accumulated changes,
or else a transcript of the build log with the warnings?

thanks
-- PMM



reply via email to

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