[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] checkpatch.pl: make C99 comments a warning,
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] checkpatch.pl: make C99 comments a warning, not error |
Date: |
Fri, 1 Apr 2011 21:46:18 +0300 |
On Fri, Apr 1, 2011 at 6:20 PM, Michael Roth <address@hidden> 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);
I think the only reasonable use for C99 comments is
//#define DEBUG_xyz
for quickly enabling debugging printfs.
But even this pattern should be replaced by tracepoints, since they
are much better. So I'd prefer to keep the ERROR.
- [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Michael Roth, 2011/04/01
- [Qemu-devel] [PATCH 2/2] checkpatch.pl: make C99 comments a warning, not error, Michael Roth, 2011/04/01
- [Qemu-devel] [PATCH 1/2] checkpatch.pl: add --no-fail-on-warn option, Michael Roth, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Peter Maydell, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Stefan Hajnoczi, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Peter Maydell, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Michael Roth, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Peter Maydell, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Michael Roth, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Stefan Hajnoczi, 2011/04/01
- Re: [Qemu-devel] checkpatch.pl: warn on C99 comments, but don't fail, Michael Roth, 2011/04/01