On Tue, Feb 21, 2006 at 09:12:28PM +0100, Stephan Peijnik wrote: > I'm compiling a fresh copy of 4.1 right now, but a good example would be > drivers/char/agp/generic.c's get_agp_version function. It defines a 'u32 > ncapid'. A pointer to that u32 is then given to pci_read_config_dword > and at exactly that point gcc-4.0 starts complaining. See below. > > > void get_agp_version(struct agp_bridge_data *bridge) > { > u32 ncapid; > > /* Exit early if already set by errata workarounds. */ > if (bridge->major_version != 0) > return; > > pci_read_config_dword(bridge->dev, bridge->capndx, &ncapid); > [...] > gcc bug. It doesn't seem to understand that sometimes ptrs to vars get passed to functions that instantiate them. There are dozens and dozens of such instances in the kernel tree. 99% of the time that warning is completely bogus. Dave