summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-11-24 22:27:08 +0100
committerWolfgang Denk <wd@denx.de>2010-11-26 22:08:18 +0100
commit84db715ea4b593dcd49ebad72ee647e62e2414cc (patch)
tree73010876a0812b96732d0b7b2af79b1059635cc1
parent57d6c589f5045559617d48b7f6eb4658f4fa7bad (diff)
downloadu-boot-imx-84db715ea4b593dcd49ebad72ee647e62e2414cc.zip
u-boot-imx-84db715ea4b593dcd49ebad72ee647e62e2414cc.tar.gz
u-boot-imx-84db715ea4b593dcd49ebad72ee647e62e2414cc.tar.bz2
cam5200_niosflash: fix build warnings
Fix warnings: cam5200_flash.c: In function 'write_word_32': cam5200_flash.c:443: warning: dereferencing type-punned pointer will break strict-aliasing rules cam5200_flash.c: In function 'write_word_16': cam5200_flash.c:684: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
-rw-r--r--board/tqc/tqm5200/cam5200_flash.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/board/tqc/tqm5200/cam5200_flash.c b/board/tqc/tqm5200/cam5200_flash.c
index 124b47d..4c8922f 100644
--- a/board/tqc/tqm5200/cam5200_flash.c
+++ b/board/tqc/tqm5200/cam5200_flash.c
@@ -440,7 +440,9 @@ static int write_word(flash_info_t * info, ulong dest, ulong 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;
+ ulong *datap = &data;
+ volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 =
+ (volatile CONFIG_SYS_FLASH_WORD_SIZE *)datap;
ulong start;
int i, flag;
@@ -681,7 +683,9 @@ static int write_word_16(flash_info_t * info, ulong dest, ulong 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;
+ ulong *datap = &data;
+ volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 =
+ (volatile CONFIG_SYS_FLASH_WORD_SIZE *)datap;
ulong start;
int i;