mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-10-03 03:31:37 +02:00
PPC MPC83xx: Fix MPC8323ERDB build warning
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 <wd@denx.de> cc: Timur Tabi <timur@tabi.org> cc: Kim Phillips <kim.phillips@freescale.com>
This commit is contained in:
parent
04735e9c55
commit
f4ea9f86d1
@ -195,7 +195,11 @@ int mac_read_from_eeprom(void)
|
|||||||
printf("\nEEPROM @ 0x%02x read FAILED!!!\n",
|
printf("\nEEPROM @ 0x%02x read FAILED!!!\n",
|
||||||
CONFIG_SYS_I2C_EEPROM_ADDR);
|
CONFIG_SYS_I2C_EEPROM_ADDR);
|
||||||
} else {
|
} 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");
|
printf("Reading MAC from EEPROM\n");
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (memcmp(&buf[i * 6], "\0\0\0\0\0\0", 6)) {
|
if (memcmp(&buf[i * 6], "\0\0\0\0\0\0", 6)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user