Commit 40867a2fe1a1b079269db19e58444213132f6799

Authored by Anatolij Gustschin
Committed by Wolfgang Denk
1 parent 821315fe2f

drivers/net/e1000.c: Fix GCC 4.6 build warnings

Fix:
e1000.c: In function 'e1000_read_mac_addr':
e1000.c:1149:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]

e1000.c:1149:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Acked-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1146,7 +1146,7 @@
1146 1146 nic->enetaddr[5] ^= 1;
1147 1147  
1148 1148 #ifdef CONFIG_E1000_FALLBACK_MAC
1149   - if ( *(u32*)(nic->enetaddr) == 0 || *(u32*)(nic->enetaddr) == ~0 ) {
  1149 + if (!is_valid_ether_addr(nic->enetaddr)) {
1150 1150 unsigned char fb_mac[NODE_ADDRESS_SIZE] = CONFIG_E1000_FALLBACK_MAC;
1151 1151  
1152 1152 memcpy (nic->enetaddr, fb_mac, NODE_ADDRESS_SIZE);