qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] pseries: Fix compiler warning (conversion of po


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH] pseries: Fix compiler warning (conversion of pointer to integral value)
Date: Wed, 19 Jun 2013 23:40:43 +0200

On 19.06.2013, at 23:08, Stefan Weil wrote:

> This kind of type cast must use uintptr_t or target_ulong to be portable
> for hosts with sizeof(void *) != sizeof(long).
> 
> Here the value is assigned to a variable of type target_ulong.
> 
> Signed-off-by: Stefan Weil <address@hidden>

Acked-by: Alexander Graf <address@hidden>

I suppose this one goes through the trivial tree?


Alex

> ---
> hw/ppc/spapr.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 218ea23..6e6f6a5 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -670,7 +670,7 @@ static void spapr_cpu_reset(void *opaque)
>     env->external_htab = spapr->htab;
>     env->htab_base = -1;
>     env->htab_mask = HTAB_SIZE(spapr) - 1;
> -    env->spr[SPR_SDR1] = (unsigned long)spapr->htab |
> +    env->spr[SPR_SDR1] = (target_ulong)spapr->htab |
>         (spapr->htab_shift - 18);
> }
> 
> -- 
> 1.7.10.4
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]