From: Wolfgang Denk Date: Fri, 11 Sep 2009 20:10:58 +0200 Subject: [U-Boot] [PATCH] board/flagadm/flash.c: fix compile warning In-Reply-To: <20090911163321.GB13783@b07421-ec1.am.freescale.net> References: <1252660703-15596-1-git-send-email-wd@denx.de> <1252660703-15596-3-git-send-email-wd@denx.de> <20090911163321.GB13783@b07421-ec1.am.freescale.net> Message-ID: <20090911181058.1BC89832E864@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Scott Wood, In message <20090911163321.GB13783@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