From: Peter Maydell <peter.maydell@linaro.org>
To: Su Hang <suhang16@mails.ucas.ac.cn>
Cc: Eric Blake <eblake@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH RFC] scripts/checkpatch.pl: Bug fix
Date: Thu, 15 Mar 2018 11:50:55 +0000 [thread overview]
Message-ID: <CAFEAcA8sKBc--=AkwXjnJxEB484Z=Gin-u2ga5nG9UR79HN-6w@mail.gmail.com> (raw)
In-Reply-To: <1521114316-19980-1-git-send-email-suhang16@mails.ucas.ac.cn>
On 15 March 2018 at 11:45, Su Hang <suhang16@mails.ucas.ac.cn> wrote:
> Bug fix: checkpatch.pl stops complaining about following pattern:
> """
> do {
> //do somethins;
> } while (conditions);
> """
>
> Two things need to be mentioned:
> 1) Before I casue this bug, checkpatch.pl will raise a wrong
> complain:
> """
> ERROR: braces {} are necessary even for single statement blocks
> + for (i == 0; i < 0; ++i)
> + {
> + ;
> + } else
> """
This is a bit of an odd example -- for() loops don't
take "else" clauses, so what is the 'else' doing here?
(Also, for QEMU style the "{" should be on the same line as the for(),
not on a line of its own.)
thanks
-- PMM
next prev parent reply other threads:[~2018-03-15 11:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 11:45 [Qemu-devel] [PATCH RFC] scripts/checkpatch.pl: Bug fix Su Hang
2018-03-15 11:50 ` Peter Maydell [this message]
2018-03-15 12:06 ` Su Hang
-- strict thread matches above, loose matches on Subject: below --
2018-03-19 13:56 Su Hang
2018-03-19 15:25 ` Eric Blake
2018-03-19 15:50 ` Su Hang
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='CAFEAcA8sKBc--=AkwXjnJxEB484Z=Gin-u2ga5nG9UR79HN-6w@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=suhang16@mails.ucas.ac.cn \
--cc=vsementsov@virtuozzo.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 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).