All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Borzenkov <pavel.borzenkov@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Bug in checkpatch.pl?
Date: Fri, 26 Aug 2011 14:28:02 +0400	[thread overview]
Message-ID: <4E577532.4070901@gmail.com> (raw)

Hi.

checkpatch.pl correctly reports a warning for the following code:

if (something)
     foo;
else
     bar;

WARNING: braces {} are necessary for all arms of this statement
#1: FILE: tmp/a.c:1:
+if (something)
[...]
+else
[...]


But if I modify it as follows, checkpatch.pl doesn't report any 
warning/error:

if (something) {
     foo;
} else
     bar;

Doesn't QEMU coding style forbid such constructions?

-- 
Pavel

             reply	other threads:[~2011-08-26 10:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 10:28 Pavel Borzenkov [this message]
2011-08-26 12:53 ` [Qemu-devel] Bug in checkpatch.pl? Stefan Hajnoczi

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=4E577532.4070901@gmail.com \
    --to=pavel.borzenkov@gmail.com \
    --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 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.