qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] checkpatch.pl: make C99 comments a warning,


From: Michael Roth
Subject: [Qemu-devel] Re: [PATCH 2/2] checkpatch.pl: make C99 comments a warning, not error
Date: Fri, 01 Apr 2011 10:33:45 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 04/01/2011 10:20 AM, Michael Roth wrote:
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<address@hidden>
---
  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;
+}

Ugh, please ignore this test.c addition. Let me know if I should resend





reply via email to

[Prev in Thread] Current Thread [Next in Thread]