[U-Boot-Users] [PATCH] Fix warnings while compiling net/net.c for MPC8610HPCD board
Scott Wood
scottwood at freescale.com
Wed Apr 30 17:38:02 CEST 2008
On Wed, Apr 30, 2008 at 01:34:40PM +0200, Anatolij Gustschin wrote:
> diff --git a/include/net.h b/include/net.h
> index f6decdc..9a2f03f 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;
> }
>
Maybe we should remove the volatile from the callers instead?
-Scott
More information about the U-Boot
mailing list