Re: IA32 (2.6.11 - 2005-03-12.16.00) - 56 New warnings

From: Andrew Morton
Date: Sun Mar 13 2005 - 14:39:20 EST


Johannes Stezenbach <js@xxxxxxxxxxx> wrote:
>
> On Sat, Mar 12, 2005 at 09:08:45PM -0800, John Cherry wrote:
> > drivers/media/dvb/frontends/dvb-pll.c:104: warning: (near initialization for `dvb_pll_unknown_1.entries')
> > drivers/media/dvb/frontends/dvb-pll.c:104: warning: excess elements in array initializer
> > drivers/media/dvb/frontends/dvb-pll.c:105: warning: (near initialization for `dvb_pll_unknown_1.entries')
> > drivers/media/dvb/frontends/dvb-pll.c:105: warning: excess elements in array initializer
> [snip]
>
> Gerd's original patch had
>
> struct dvb_pll_desc {
> char *name;
> u32 min;
> u32 max;
> void (*setbw)(u8 *buf, int bandwidth);
> int count;
> struct {
> u32 limit;
> u32 offset;
> u32 stepsize;
> u8 cb1;
> u8 cb2;
> } entries[];
> };
>
> while 2.6.11-mm3 changed it into entries[0].

The original code failed to compile with gcc-2.95.4, so I stuck the [0] in
there, then was vaguely surprised when no warnings came out. Seems that
later compilers _do_ warn.

I guess we could put a 9 in there.
-
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/