qemu-devel
[Top][All Lists]
Advanced

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

Re: [v2] Help wanted for enabling -Wshadow=local


From: Markus Armbruster
Subject: Re: [v2] Help wanted for enabling -Wshadow=local
Date: Tue, 26 Sep 2023 22:47:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Warner Losh <imp@bsdimp.com> writes:

> On Tue, Sep 26, 2023 at 8:43 AM Markus Armbruster <armbru@redhat.com> wrote:
>
>> Brian, Gerd, Jason, Marc-André, Michael, we need your help to enable
>> -Wshadow=local.
>>
>> Paolo, you already took care of several subsystems (thanks!), except you
>> left a few warnings in target/i386/tcg/seg_helper.c.
>>
>>
>> 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.
>>
>> People responded quickly to my first call for help.  Thank you so much!
>>
>> I'm collecting patches in my git repo at
>> https://repo.or.cz/qemu/armbru.git in branch shadow-next, output of
>> git-shortlog appended.  I'm happy to do pull requests.  I don't mind
>> maintainers merging patches for their subsystems; interference should be
>> minimal.
>>
>> My test build is down to 19 files with warnings.  Sorted by subsystems,
>> files covered by multiple subsystems marked "(*NUMBER*)":
>>
>
> Please make sure it's disabled for the bsd-user build. I have 3 patches in
> my queue
> to fix that, but I'm recovering from an illness and trying to land a large
> number of patches
> from my gsoc student Karim and git publish is being a pain. If this can
> wait a week, I'll
> likely be better enough by then and can submit the patches. They are all
> trivial, but one
> depends on the tcg header cleanups.

Waiting a week or two for bsd-user is no problem.  We don't need to
commit all -Wshadow cleanups in one go.

Get well!

[...]




reply via email to

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