summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2008-04-30 13:34:40 +0200
committerWolfgang Denk <wd@denx.de>2008-04-30 22:32:07 +0200
commit33a4a70d48d622cc4950c60a84fec23b9421f23e (patch)
tree5caba8d0b0de00d7dc104f488d356fd80b330f9c /include/net.h
parent58b575e575c25fdf8c88141e145db201f3092149 (diff)
Fix warnings while compiling net/net.c for MPC8610HPCD board
MPC8610HPCD board adds -O2 gcc option to PLATFORM_CPPFLAGS causing overriding default -Os option. New gcc (ver. 4.2.2) produces warnings while compiling net/net.c file with -O2 option. The patch is an attempt to fix this. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net.h b/include/net.h
index f6decdca883..9a2f03fe983 100644
--- a/include/net.h
+++ b/include/net.h
@@ -412,10 +412,10 @@ extern void print_IPaddr (IPaddr_t);
* footprint in our tests.
*/
/* return IP *in network byteorder* */
-static inline IPaddr_t NetReadIP(void *from)
+static inline IPaddr_t NetReadIP(volatile void *from)
{
IPaddr_t ip;
- memcpy((void*)&ip, from, sizeof(ip));
+ memcpy((void*)&ip, (void*)from, sizeof(ip));
return ip;
}
@@ -434,9 +434,9 @@ static inline void NetWriteIP(void *to, IPaddr_t ip)
}
/* copy IP */
-static inline void NetCopyIP(void *to, void *from)
+static inline void NetCopyIP(volatile void *to, void *from)
{
- memcpy(to, from, sizeof(IPaddr_t));
+ memcpy((void*)to, from, sizeof(IPaddr_t));
}
/* copy ulong */