mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 16:10:58 +00:00
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>
This commit is contained in:
parent
58b575e575
commit
33a4a70d48
1 changed files with 4 additions and 4 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue