From: Wolfgang Denk Date: Fri, 14 Jun 2013 08:20:44 +0000 (+0200) Subject: PPC 74xx_7xx: Fix build warnings for ELPPC board X-Git-Tag: v2013.07-rc2~6^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b8bfde7f0157c1266b23d71a5da81319302d9bb4;p=u-boot PPC 74xx_7xx: Fix build warnings for ELPPC board Fix: misc.c: In function 'misc_init_r': misc.c:210:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] misc.c:211:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] misc.c:212:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Wolfgang Denk --- diff --git a/board/eltec/elppc/misc.c b/board/eltec/elppc/misc.c index 89f1b1d355..4c3656e24d 100644 --- a/board/eltec/elppc/misc.c +++ b/board/eltec/elppc/misc.c @@ -207,9 +207,14 @@ int misc_init_r (void) buf[4] = eerev.etheraddr[5]; buf[5] = eerev.etheraddr[4]; - *(unsigned short *) &buf[20] = 0x48B2; - *(unsigned short *) &buf[22] = 0x0004; - *(unsigned short *) &buf[24] = 0x1433; + buf[20] = 0x48; + buf[21] = 0xB2; + + buf[22] = 0x00; + buf[23] = 0x04; + + buf[24] = 0x14; + buf[25] = 0x33; printf ("\nSRom: Writing i82559 info ........ "); if (eepro100_srom_store ((unsigned short *) buf) == -1)