[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.6.18-rc1-mm1: drivers/ide/pci/jmicron.c warning
On Tue, Jul 11, 2006 at 10:02:57AM -0400, Alan Cox wrote:
> On Tue, Jul 11, 2006 at 02:52:58PM +0200, Adrian Bunk wrote:
> > CC drivers/ide/pci/jmicron.o
> > drivers/ide/pci/jmicron.c: In function ???ata66_jmicron???:
> > drivers/ide/pci/jmicron.c:99: warning: control reaches end of non-void function
> If your gcc does this please file a gcc bug report
> > At least from gcc's perspective, this warning is correct, and it should
> > therefore be fixed.
> No. port_type is an enum. Each enum value in question is present in the
> switch (and gcc knows this), each has a return. Your compiler is buggy.

I'm not a C expert myself, so I asked a gcc developer on irc.

The problem is that C allows you to assign other values than the ones
listed in the enum to the variable.



"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-07-12 00:13    [W:0.140 / U:3.236 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site