diff options
author | Kim Phillips <kim.phillips@freescale.com> | 2009-07-17 12:17:00 -0500 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2009-07-22 22:53:44 -0700 |
commit | 88ad3fd91c83a4343b25385fd78fd8e29ebb723f (patch) | |
tree | 37b1573a095be3a1b063a7c7c40209242e024e9d | |
parent | d9bec9f42ab34383737c8a94429aa02fe76d7946 (diff) | |
download | u-boot-imx-88ad3fd91c83a4343b25385fd78fd8e29ebb723f.zip u-boot-imx-88ad3fd91c83a4343b25385fd78fd8e29ebb723f.tar.gz u-boot-imx-88ad3fd91c83a4343b25385fd78fd8e29ebb723f.tar.bz2 |
net: tsec - fix dereferencing type-punned pointer will break strict-aliasing rules warning
fix this gcc 4.4 warning:
tsec.c: In function 'tsec_init':
tsec.c:200: warning: dereferencing type-punned pointer will break strict-aliasing rules
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r-- | drivers/net/tsec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 63fc02e..5dc05e5 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -197,7 +197,10 @@ int tsec_init(struct eth_device *dev, bd_t * bd) for (i = 0; i < MAC_ADDR_LEN; i++) { tmpbuf[MAC_ADDR_LEN - 1 - i] = dev->enetaddr[i]; } - regs->macstnaddr1 = *((uint *) (tmpbuf)); + tempval = (tmpbuf[0] << 24) | (tmpbuf[1] << 16) | (tmpbuf[2] << 8) | + tmpbuf[3]; + + regs->macstnaddr1 = tempval; tempval = *((uint *) (tmpbuf + 4)); |