[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcF_F6BRjuGMsKu-u3aMHdXWGutd85jzzYcLRmSX6=8ow@mail.gmail.com>
Date: Thu, 29 Nov 2012 14:57:36 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org,
Stefani Seibold <stefani@...bold.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH, resend] kfifo: initialize fifo accordingly to C99 standard
On Thu, Nov 29, 2012 at 11:21 AM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Thu, Nov 29, 2012 at 1:56 AM, Andrew Morton
> <akpm@...ux-foundation.org> wrote:
>> On Wed, 21 Nov 2012 16:31:11 +0200
>> Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
>>
>>> When build a kernel with "make W=1" we will get a warning about missing
>>> initializer. It comes from kfifo usage style. The DEFINE_KFIFO macro doesn't
>>> initialize the buf[] field of the fifo structure. So, using C99 style helps in
>>> such case.
>>
>> I see no such warning. When fixing warnings or compilation errors,
>> please always quote the compiler output in the changelog.
>
> Oh, I did wrong assumption. However, it looks like linux-stable 3.0.y
> is affected;
>
> CC [M] samples/kfifo/inttype-example.o
> samples/kfifo/inttype-example.c:44:506: warning: missing initializer
> [-Wmissing-field-initializers]
> samples/kfifo/inttype-example.c:44:506: warning: (near initialization
> for ‘(anonymous).buf’) [-Wmissing-field-initializers]
>
> And it seems that my solution not the one which is used in linux-next.
Okay. I found the commit f858ee8b8cd8c216ddbeefae6e047ce90cae9cca
("kbuild: disable -Wmissing-field-initializers for W=1") hides the
warning.
After reverting this one I get the same warning as before:
CC [M] samples/kfifo/inttype-example.o
samples/kfifo/inttype-example.c:44:506: warning: missing initializer
[-Wmissing-field-initializers]
samples/kfifo/inttype-example.c:44:506: warning: (near initialization
for ‘(anonymous).buf’) [-Wmissing-field-initializers]
> gcc (Debian 4.7.2-2) 4.7.2
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists