[U-Boot] [PATCH] board/flagadm/flash.c: fix compile warning

Wolfgang Denk wd at denx.de
Fri Sep 11 20:10:58 CEST 2009


Dear Scott Wood,

In message <20090911163321.GB13783 at b07421-ec1.am.freescale.net> you wrote:
>
> > -	ushort * d = (ushort*)&da;
> > +	ulong *dla = &da;
> > +	ushort *d = (ushort*)dla;
> 
> I don't see how this is any more legal under strict aliasing rules -- you
> just made it a little more complicated and fooled the compiler into not
> warning.

Hm... I apologize if I don;t understand this any better, but for me
silencing the compiler was all that I intended at this moment ;-)

Do you have any better approach?

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
Eureka!                                                 -- Archimedes


More information about the U-Boot mailing list