All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning
@ 2009-09-11  9:49 Wolfgang Denk
  2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Wolfgang Denk @ 2009-09-11  9:49 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Andrea Marson <andrea.marson@dave-tech.it>
---
 board/dave/common/flash.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/dave/common/flash.c b/board/dave/common/flash.c
index b6af63b..29caf47 100644
--- a/board/dave/common/flash.c
+++ b/board/dave/common/flash.c
@@ -663,9 +663,10 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
  */
 static int write_word (flash_info_t *info, ulong dest, ulong data)
 {
+	ulong *data_ptr = &data;
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *)(info->start[0]);
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *)dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)&data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *)data_ptr;
 	ulong start;
 	int flag;
 	int i;
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2009-09-22 21:54 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11  9:49 [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/common/flash.c: Fix " Wolfgang Denk
2009-09-11 13:06   ` Stefan Roese
2009-09-14 22:30   ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error Wolfgang Denk
2009-09-14 22:18   ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/linkstation/ide.c: Fix compile warning Wolfgang Denk
2009-09-11 11:00   ` Guennadi Liakhovetski
2009-09-11 12:00     ` Wolfgang Denk
2009-09-11 12:03       ` Guennadi Liakhovetski
2009-09-11 17:54       ` Scott Wood
2009-09-14 22:26         ` [U-Boot] [PATCH v2] " Wolfgang Denk
2009-09-15 20:42           ` Guennadi Liakhovetski
2009-09-15 21:16             ` Wolfgang Denk
2009-09-16 20:42               ` Guennadi Liakhovetski
2009-09-22 20:26                 ` Wolfgang Denk
2009-09-22 20:51                   ` Guennadi Liakhovetski
2009-09-22 21:54                     ` Wolfgang Denk
2009-09-22 21:54           ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/taihu/flash.c: " Wolfgang Denk
2009-09-11 13:07   ` Stefan Roese
2009-09-14 22:28   ` Wolfgang Denk
2009-09-11  9:49 ` [U-Boot] [PATCH] board/amcc/yucca/flash.c: " Wolfgang Denk
2009-09-11 13:08   ` Stefan Roese
2009-09-14 22:29   ` Wolfgang Denk
2009-09-14 22:16 ` [U-Boot] [PATCH] board/dave/common/flash.c: fix " Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.