summaryrefslogtreecommitdiff
path: root/src/flash/nand
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-09-03 22:49:37 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-09-20 13:12:35 +0200
commitf6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab (patch)
tree2b9430c70669a47b3503e00612b68238a70a3ea9 /src/flash/nand
parent32ab98c9e9672d0f1d8758c7dfb478b0316c13af (diff)
downloadopenocd+libswd-f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab.tar.gz
openocd+libswd-f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab.tar.bz2
openocd+libswd-f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab.tar.xz
openocd+libswd-f6a3fc818bc6a24b6c5bbcc6057f72d2b0b2e2ab.zip
warnings: fix alignment warnings
These warnings are for architectures that do not support non-aligned word access. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash/nand')
-rw-r--r--src/flash/nand/lpc3180.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nand/lpc3180.c b/src/flash/nand/lpc3180.c
index 93d00d5c..d81443d1 100644
--- a/src/flash/nand/lpc3180.c
+++ b/src/flash/nand/lpc3180.c
@@ -1119,9 +1119,9 @@ static int lpc3180_read_page(struct nand_device *nand, uint32_t page, uint8_t *d
target_read_memory(target, target_mem_base+SPARE_OFFS, 4, 16, ecc_flash_buffer);
target_read_memory(target, target_mem_base+ECC_OFFS, 4, 8, ecc_hw_buffer);
for(i=0;i<idx;i++){
- if( (0x00ffffff&*(uint32_t *)(ecc_hw_buffer+i*8)) != (0x00ffffff&*(uint32_t *)(ecc_flash_buffer+8+i*16)) )
+ if( (0x00ffffff&*(uint32_t *)(void *)(ecc_hw_buffer+i*8)) != (0x00ffffff&*(uint32_t *)(void *)(ecc_flash_buffer+8+i*16)) )
LOG_WARNING("ECC mismatch at 256 bytes size block= %d at page= 0x%" PRIx32,i*2+1,page);
- if( (0x00ffffff&*(uint32_t *)(ecc_hw_buffer+4+i*8)) != (0x00ffffff&*(uint32_t *)(ecc_flash_buffer+12+i*16)) )
+ if( (0x00ffffff&*(uint32_t *)(void *)(ecc_hw_buffer+4+i*8)) != (0x00ffffff&*(uint32_t *)(void *)(ecc_flash_buffer+12+i*16)) )
LOG_WARNING("ECC mismatch at 256 bytes size block= %d at page= 0x%" PRIx32,i*2+2,page);
}
}