From: Isaku Yamahata <isaku.yamahata@gmail.com>
To: Greg Kurz <groug@kaod.org>
Cc: isaku.yamahata@intel.com,
Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, Isaku Yamahata <isaku.yamahata@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] checkpatch: Fix use of uninitialized value
Date: Fri, 9 Apr 2021 10:55:12 -0700 [thread overview]
Message-ID: <20210409175512.GB218869@ls> (raw)
In-Reply-To: <20210409074011.12ea4ed2@bahia.lan>
On Fri, Apr 09, 2021 at 07:40:11AM +0200,
Greg Kurz <groug@kaod.org> wrote:
> On Thu, 8 Apr 2021 10:49:13 -0700
> Isaku Yamahata <isaku.yamahata@gmail.com> wrote:
>
> >
> > How about initializing them explicitly as follows?
> > ($realfile ne '') prevents the case realfile eq '' && acpi_testexpted eq ''.
> > Anyway your patch also should fix it. So
> > Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
> >
> >
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 8f7053ec9b..2eb894a628 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -1325,8 +1325,8 @@ sub process {
> > my %suppress_whiletrailers;
> > my %suppress_export;
> >
> > - my $acpi_testexpected;
> > - my $acpi_nontestexpected;
> > + my $acpi_testexpected = '';
> > + my $acpi_nontestexpected = '';
> >
>
> Hmm... I haven't tried but I believe this will break when these are
> passed to checkfilename() :
>
> sub checkfilename {
> my ($name, $acpi_testexpected, $acpi_nontestexpected) = @_;
> [...]
> if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) {
> ERROR("Do not add expected files together with tests, " .
>
>
> > # Pre-scan the patch sanitizing the lines.
Oops. You're right. I scratch it.
--
Isaku Yamahata <isaku.yamahata@gmail.com>
next prev parent reply other threads:[~2021-04-09 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 6:51 [PATCH] checkpatch: Fix use of uninitialized value Greg Kurz
2021-04-08 17:49 ` Isaku Yamahata
2021-04-09 5:40 ` Greg Kurz
2021-04-09 17:55 ` Isaku Yamahata [this message]
2021-04-09 15:08 ` Alex Bennée
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=20210409175512.GB218869@ls \
--to=isaku.yamahata@gmail.com \
--cc=groug@kaod.org \
--cc=isaku.yamahata@intel.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).