From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 2 Apr 2008 16:34:09 +0200 Subject: [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules In-Reply-To: <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> References: <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com> <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <200804021634.09334.sr@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 On Wednesday 02 April 2008, Jean-Christophe PLAGNIOL-VILLARD wrote: > cmd_nand.c:353: warning: dereferencing type-punned pointer will break > strict-aliasing rules cmd_nand.c:356: warning: dereferencing type-punned > pointer will break strict-aliasing rules > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD NAK. Patch doesn't work. After applying I get the following messages on Kilauea: => nand write 100000 0 100000 NAND write: device 0 offset 0x0, size 0x0 0 bytes written: OK => nand read 200000 0 100000 NAND read: device 0 offset 0x0, size 0x0 0 bytes read: OK So nothing is read/written at all. This is how it behaves without this patch: => nand write 100000 0 100000 NAND write: device 0 offset 0x0, size 0x100000 1048576 bytes written: OK => nand read 200000 0 100000 NAND read: device 0 offset 0x0, size 0x100000 1048576 bytes read: OK Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================