[U-Boot] [PATCH 05/22] board/linkstation/ide.c: Fix GCC 4.6 build warnings

Wolfgang Denk wd at denx.de
Mon Nov 7 22:47:11 CET 2011


Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.1111061837280.3373 at axis700.grange> you wrote:
> 
> > +#if CONFIG_SYS_IDE_MAXBUS > 1
> 
> I don't have gcc 4.6 installed here unfortunately, but wondering, wouldn't 
> this
> 
> 	if (CONFIG_SYS_IDE_MAXBUS > 1) {
> 		ide_bus_offset[1]...
> 	}
> 
> also make the compiler happy? Maybe not, because, probably, the above "if" 
> would be optimised away after indicies are verifies. But if it does fix 
> the problem too - it would be preferable IMHO. Of course, one could also 
> use a perversion like

This works as well.  Patch adapted to your suggestion.  Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Each kiss is as the first.
	-- Miramanee, Kirk's wife, "The Paradise Syndrome",
	   stardate 4842.6


More information about the U-Boot mailing list