projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04735e9
)
PPC MPC83xx: Fix MPC8323ERDB build warning
author
Wolfgang Denk
<
[email protected]
>
Sun, 14 Jul 2013 17:42:40 +0000
(19:42 +0200)
committer
Tom Rini
<
[email protected]
>
Mon, 15 Jul 2013 22:03:15 +0000
(18:03 -0400)
Fix:
mpc8323erdb.c: In function 'mac_read_from_eeprom':
mpc8323erdb.c:198:3: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
Signed-off-by: Wolfgang Denk <
[email protected]
>
cc: Timur Tabi <
[email protected]
>
cc: Kim Phillips <
[email protected]
>
board/freescale/mpc8323erdb/mpc8323erdb.c
patch
|
blob
|
history
diff --git
a/board/freescale/mpc8323erdb/mpc8323erdb.c
b/board/freescale/mpc8323erdb/mpc8323erdb.c
index f29b2f4f4f67cf51de7775eca8108f9b74aaa0e3..3dce3623a411acb147d19518a664a141cc246eeb 100644
(file)
--- a/
board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/
board/freescale/mpc8323erdb/mpc8323erdb.c
@@
-195,7
+195,11
@@
int mac_read_from_eeprom(void)
printf("\nEEPROM @ 0x%02x read FAILED!!!\n",
CONFIG_SYS_I2C_EEPROM_ADDR);
} else {
- if (crc32(crc, buf, 24) == *(unsigned int *)&buf[24]) {
+ uint32_t crc_buf;
+
+ memcpy(&crc_buf, &buf[24], sizeof(uint32_t));
+
+ if (crc32(crc, buf, 24) == crc_buf) {
printf("Reading MAC from EEPROM\n");
for (i = 0; i < 4; i++) {
if (memcmp(&buf[i * 6], "\0\0\0\0\0\0", 6)) {