All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Warner Losh <imp@bsdimp.com>
Cc: "Brian Cain" <bcain@quicinc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-devel@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Eduardo Habkost" <eduardo@habkost.net>
Subject: Re: [v2] Help wanted for enabling -Wshadow=local
Date: Tue, 26 Sep 2023 22:47:23 +0200	[thread overview]
Message-ID: <875y3wirvo.fsf@pond.sub.org> (raw)
In-Reply-To: <CANCZdfoaEuOQkeRsdBYuwer2mU6=J4RQ9Vnt5JWQB=T6-q_eRA@mail.gmail.com> (Warner Losh's message of "Tue, 26 Sep 2023 09:52:39 -0600")

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	other threads:[~2023-09-26 20:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 14:42 [v2] Help wanted for enabling -Wshadow=local Markus Armbruster
2023-09-26 15:03 ` Markus Armbruster
2023-09-26 15:43 ` Paolo Bonzini
2023-09-26 15:52 ` Warner Losh
2023-09-26 20:47   ` Markus Armbruster [this message]

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=875y3wirvo.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=bcain@quicinc.com \
    --cc=eduardo@habkost.net \
    --cc=imp@bsdimp.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.