Skip to content
Snippets Groups Projects
Commit 88ad3fd9 authored by Kim Phillips's avatar Kim Phillips Committed by Ben Warren
Browse files

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: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent d9bec9f4
No related branches found
No related tags found
No related merge requests found
...@@ -197,7 +197,10 @@ int tsec_init(struct eth_device *dev, bd_t * bd) ...@@ -197,7 +197,10 @@ int tsec_init(struct eth_device *dev, bd_t * bd)
for (i = 0; i < MAC_ADDR_LEN; i++) { for (i = 0; i < MAC_ADDR_LEN; i++) {
tmpbuf[MAC_ADDR_LEN - 1 - i] = dev->enetaddr[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)); tempval = *((uint *) (tmpbuf + 4));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment