Re: [PATCH][trivial] Kill off a bunch of annoying warning: ʽinlineʼ is not at beginning of declaration

From: Jesper Juhl
Date: Sun Nov 28 2010 - 17:19:31 EST


On Sun, 28 Nov 2010, Jiri Kosina wrote:

> On Sun, 28 Nov 2010, Jesper Juhl wrote:
>
> > Hi,
> >
> > These warnings are spewed during a build of a 'allnoconfig' kernel
> > (especially the ones from u64_stats_sync.h show up a lot) when building
> > with -Wextra (which I often do)..
> > They are
> > a) annoying
> > b) easy to get rid of.
> > This patch kills them off.
>
> Hmm, this made me look into what -Wextra actually does ... and it seems
> quite fishy for kernel. For example my gcc manpage tells me
>
> -Wempty-body
> Warn if an empty body occurs in an if, else or do while statement.
> This warning is also enabled by -Wextra.
>
> And we do have quite a bunch of 'do { } while (0);' in kernel. So it seems
> to me like you'll be getting much more noise with -Wextra than the lines
> below, won't you?
>

Yes, I'm getting a lot of noise, and most of it I'll just live with since
it's not relevant.
But, some of it - like what this patch addresses - is noise that can
easily just go away and I think it should.

--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/