qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pseries: Fix compiler warning (conversion of pointer to integral value)
@ 2013-06-19 21:08 Stefan Weil
  2013-06-19 21:40 ` Alexander Graf
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Weil @ 2013-06-19 21:08 UTC (permalink / raw)
  To: qemu-trivial; +Cc: qemu-devel, Stefan Weil, Alexander Graf, David Gibson

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 <sw@weilnetz.de>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-20  8:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 21:08 [Qemu-devel] [PATCH] pseries: Fix compiler warning (conversion of pointer to integral value) Stefan Weil
2013-06-19 21:40 ` Alexander Graf
2013-06-20  4:40   ` Stefan Weil
2013-06-20  5:10   ` Michael Tokarev
2013-06-20  5:33     ` [Qemu-devel] deadlock while running graphics application on QEMU Mirza, Taimoor
2013-06-20  8:48     ` [Qemu-devel] [PATCH] pseries: Fix compiler warning (conversion of pointer to integral value) Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).