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

Wolfgang Denk
2009-09-11T09:18:19Z

Fix warning: flash.c:531: warning: dereferencing type-punned pointer
will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: K?ri Dav??sson <kd@flaga.is>
---
board/flagadm/flash.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/flagadm/flash.c b/board/flagadm/flash.c
index bbefbac..ff37d9e 100644
--- a/board/flagadm/flash.c
+++ b/board/flagadm/flash.c
@@ -528,7 +528,8 @@ int write_word (flash_info_t *info, ulong dest, ulong da)
ulong start;
char csr;
int flag;
- ushort * d = (ushort*)&da;
+ ulong *dla = &da;
+ ushort *d = (ushort*)dla;
int i;

/* Check if Flash is (sufficiently) erased */
--
1.6.0.6