qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 38/56] hw/acpi: changes towards enabling -Wshadow=local


From: Michael S. Tsirkin
Subject: Re: [PULL 38/56] hw/acpi: changes towards enabling -Wshadow=local
Date: Mon, 2 Oct 2023 06:49:21 -0400

On Sat, Sep 30, 2023 at 10:41:12AM +0200, Markus Armbruster wrote:
> Ani Sinha <anisinha@redhat.com> writes:
> 
> >> On 29-Sep-2023, at 2:20 PM, Markus Armbruster <armbru@redhat.com> wrote:
> >> 
> >> From: Ani Sinha <anisinha@redhat.com>
> >> 
> >> Code changes in acpi that addresses all compiler complaints coming from 
> >> enabling
> >> -Wshadow flags. Enabling -Wshadow catches cases of local variables 
> >> shadowing
> >> other local variables or parameters. These makes the code confusing and/or 
> >> adds
> >> bugs that are difficult to catch.  See also
> >> 
> >>    Subject: Help wanted for enabling -Wshadow=local
> >>    Message-Id: <87r0mqlf9x.fsf@pond.sub.org>
> >>    https://lore.kernel.org/qemu-devel/87r0mqlf9x.fsf@pond.sub.org
> >> 
> >> The code is tested to build with and without the flag turned on.
> >> 
> >> CC: Markus Armbruster <armbru@redhat.com>
> >> CC: Philippe Mathieu-Daude <philmd@linaro.org>
> >> CC: mst@redhat.com
> >> CC: imammedo@redhat.com
> >> Signed-off-by: Ani Sinha <anisinha@redhat.com>
> >> Message-ID: <20230922124203.127110-1-anisinha@redhat.com>
> >> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> >> [Commit message tweaked]
> >> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> >
> > Thanks!
> > Are you not going to pick up "hw/i386: changes towards enabling 
> > -Wshadow=local” ?
> 
> Your conversation with Michael looked unfinished to me, so I didn't
> include your patch in my pull request.  I did add it to shadow-next.

Yes - I clarified what I meant. These patch just always
changed the name of the inner scope variable but that is not
always the best thing to do.

-- 
MST




reply via email to

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