From: Stefan Weil Date: Wed, 19 Jun 2013 21:08:29 +0000 (+0200) Subject: pseries: Fix compiler warning (conversion of pointer to integral value) X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~1643^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec4936e1a49ef2d7129a1813ed7a3ca826698bfb;p=sdk%2Femulator%2Fqemu.git pseries: Fix compiler warning (conversion of pointer to integral value) 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 [agraf: fix compilation on 32bit hosts] Signed-off-by: Alexander Graf --- diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 5363c3f..fe34291 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)(uintptr_t)spapr->htab | (spapr->htab_shift - 18); }