All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Warner Losh <imp@bsdimp.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [v3] Help wanted for enabling -Wshadow=local
Date: Mon, 09 Oct 2023 08:24:14 +0200	[thread overview]
Message-ID: <877cnw71pt.fsf@pond.sub.org> (raw)
In-Reply-To: <CANCZdfpU1eCM0fatVBuQJW9bLzTZfvp3HNQ=2Kfz9ni90PbmEg@mail.gmail.com> (Warner Losh's message of "Fri, 6 Oct 2023 13:08:38 -0600")

Warner Losh <imp@bsdimp.com> writes:

> On Fri, Oct 6, 2023, 11:55 AM Thomas Huth <thuth@redhat.com> wrote:
>
>> On 06/10/2023 18.18, Thomas Huth wrote:
>> > On 06/10/2023 16.45, Markus Armbruster wrote:
>> >> 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.
>> >>
>> >> Quite a few people responded to my calls 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.  All but the
>> >> last two are in a pending pull request.

[...]

>> >> More warnings may lurk in code my test build doesn't compile.  Need a
>> >> full CI build with -Wshadow=local to find them.  Anybody care to kick
>> >> one off?
>> >
>> > I ran a build here (with -Werror enabled, so that it's easier to see where
>> > it breaks):
>> >
>> >   https://gitlab.com/thuth/qemu/-/pipelines/1028023489
>> >
>> > ... but I didn't see any additional spots in the logs beside the ones that
>> > you already listed.
>>
>> After adding two more patches to fix the above warnings, things look
>> pretty
>> good:
>>
>>   https://gitlab.com/thuth/qemu/-/pipelines/1028413030
>>
>> There are just some warnings left in the BSD code, as Warner already
>> mentioned in his reply to v2 of your mail:
>>
>>   https://gitlab.com/thuth/qemu/-/jobs/5241420713
>
>
> I think I have fixes for these. I need to merge what just landed into
> bsd-user fork, rebase, test, the apply them to qemu master branch, retest
> and send them off...
>
> My illness has hung on longer than I thought so I'm still behind...

Get well, and looking forward to your patches!



  reply	other threads:[~2023-10-09  6:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 14:45 [v3] Help wanted for enabling -Wshadow=local Markus Armbruster
2023-10-06 16:18 ` Thomas Huth
2023-10-06 17:55   ` Thomas Huth
2023-10-06 19:08     ` Warner Losh
2023-10-09  6:24       ` Markus Armbruster [this message]
2023-10-09  7:50       ` Thomas Huth
2023-10-06 18:41 ` Markus Armbruster

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=877cnw71pt.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=imp@bsdimp.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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.