From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH 2/2] checkpatch.pl: make C99 comments a warning, not error
Date: Fri, 1 Apr 2011 10:20:55 -0500 [thread overview]
Message-ID: <1301671255-27717-3-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1301671255-27717-1-git-send-email-mdroth@linux.vnet.ibm.com>
C99 comments are pretty heavilly used in QEMU, and don't violate
anything mentioned in HACKING/CODING_STYLE. Make them warnings instead.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
scripts/checkpatch.pl | 2 +-
test.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
create mode 100644 test.c
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 770d534..2aab4e9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1799,7 +1799,7 @@ sub process {
# no C99 // comments
if ($line =~ m{//}) {
- ERROR("do not use C99 // comments\n" . $herecurr);
+ WARN("do not use C99 // comments\n" . $herecurr);
}
# Remove C99 comments.
$line =~ s@//.*@@;
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..fe3b163
--- /dev/null
+++ b/test.c
@@ -0,0 +1,5 @@
+//stuff
+static int blah(void)
+{
+ return 1;
+}
--
1.7.0.4
next prev parent reply other threads:[~2011-04-01 15:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 15:20 [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail Michael Roth
2011-04-01 15:20 ` [Qemu-devel] [PATCH 1/2] checkpatch.pl: add --no-fail-on-warn option Michael Roth
2011-04-01 15:20 ` Michael Roth [this message]
2011-04-01 15:33 ` [Qemu-devel] Re: [PATCH 2/2] checkpatch.pl: make C99 comments a warning, not error Michael Roth
2011-04-01 15:49 ` [Qemu-devel] " Stefan Hajnoczi
2011-04-01 18:46 ` Blue Swirl
2011-04-02 14:02 ` Stefan Hajnoczi
2011-04-01 15:52 ` [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail Peter Maydell
2011-04-01 15:59 ` Stefan Hajnoczi
2011-04-01 16:16 ` Peter Maydell
2011-04-01 16:55 ` Michael Roth
2011-04-01 16:58 ` Peter Maydell
2011-04-01 17:24 ` Michael Roth
2011-04-01 17:01 ` Stefan Hajnoczi
2011-04-01 17:25 ` Michael Roth
2011-04-02 13:48 ` 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=1301671255-27717-3-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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).