mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "SL Baur" <steve@xemacs.org>
To: "Andy Whitcroft" <apw@shadowen.org>
Cc: "Mike Frysinger" <vapier.adi@gmail.com>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>,
	"Michael Hennerich" <michael.hennerich@analog.com>
Subject: Re: false positive in checkpatch.pl (complex macro values)
Date: Fri, 24 Aug 2007 05:43:47 -0700	[thread overview]
Message-ID: <ed10ee420708240543r27db83e9l25300c2799c7c2cd@mail.gmail.com> (raw)
In-Reply-To: <46CEC3D4.40805@shadowen.org>

On 8/24/07, Andy Whitcroft <apw@shadowen.org> wrote:
> Mike Frysinger wrote:
> > in some code that does like:
> > #define foo { a, b, c, \
> >     d, e, f, g }
> > ...
> > int boo[] = foo;
> > ...
> >
> > checkpatch.pl throws a fit:
> > ERROR: Macros with complex values should be enclosed in parenthesis
> > #10: FILE: ...
> > +#define foo {a, b, c, d}
> >
> > perhaps the check should also allow {...} ?  or ignore lists like this ...
> > -mike
>
> Ok, we can add that to the check.  Next update will allow that.
>
> Thanks for the report.

I sent a reply accidentally only to Mike and not the list.  I think the
error message is wrong.  That is really ugly code.  Linux Kernel code
believes in C not preprocessor tricks, so why would you need this?

Who uses code like this, by the way?

-sb

  reply	other threads:[~2007-08-24 12:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-24  7:51 Mike Frysinger
2007-08-24 11:41 ` Andy Whitcroft
2007-08-24 12:43   ` SL Baur [this message]
2007-08-24 12:50     ` SL Baur
2007-08-24 13:24     ` Mike Frysinger
2007-08-24 16:47       ` Josef Sipek
2007-08-24 19:10         ` Mike Frysinger
2007-08-24 17:22     ` Olivier Galibert

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=ed10ee420708240543r27db83e9l25300c2799c7c2cd@mail.gmail.com \
    --to=steve@xemacs.org \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=vapier.adi@gmail.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

all inboxes | Powered by JetHome®