[U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules

Stefan Roese sr at denx.de
Wed Apr 2 16:34:09 CEST 2008


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 <plagnioj at jcrosoft.com>

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
=====================================================================




More information about the U-Boot mailing list