diff options
author | Anatolij Gustschin <agust@denx.de> | 2011-12-20 07:36:39 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-12-20 23:21:03 +0100 |
commit | 40867a2fe1a1b079269db19e58444213132f6799 (patch) | |
tree | b5eb4d3204d029c439bb1ae0d77ee196d4601bc2 /drivers/net/e1000.c | |
parent | 821315fe2f4f571e472edf1952005f75b0499823 (diff) | |
download | u-boot-40867a2fe1a1b079269db19e58444213132f6799.tar.gz u-boot-40867a2fe1a1b079269db19e58444213132f6799.tar.bz2 u-boot-40867a2fe1a1b079269db19e58444213132f6799.zip |
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>
Diffstat (limited to 'drivers/net/e1000.c')
-rw-r--r-- | drivers/net/e1000.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 6b71bd901e..e726f398d4 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1146,7 +1146,7 @@ e1000_read_mac_addr(struct eth_device *nic) nic->enetaddr[5] ^= 1; #ifdef CONFIG_E1000_FALLBACK_MAC - if ( *(u32*)(nic->enetaddr) == 0 || *(u32*)(nic->enetaddr) == ~0 ) { + if (!is_valid_ether_addr(nic->enetaddr)) { unsigned char fb_mac[NODE_ADDRESS_SIZE] = CONFIG_E1000_FALLBACK_MAC; memcpy (nic->enetaddr, fb_mac, NODE_ADDRESS_SIZE); |