Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 316

kvm-83-164.el5_5.30.src.rpm

From 8f8bfc30a64e4d05c979b4636d25725be0bad1c8 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Thu, 17 Sep 2009 14:06:03 -0300
Subject: [PATCH 32/38] int and long masked as pointers. cast to avoid warnings

RH-Author: Juan Quintela <quintela@redhat.com>
Message-id: <84d1890bdb52088b821012ed18ebeaa3caa3e4d4.1249487147.git.quintela@redhat.com>
Patchwork-id: 3204
O-Subject: [PATCH 37/38] int and long masked as pointers. cast to avoid warnings
Bugzilla: 515749
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Dor Laor <dlaor@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>

this is the solution adopted in qemu-kvm upstream.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 qemu/qemu-kvm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu/qemu-kvm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index d4b1749..32b647f 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -103,12 +103,12 @@ static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
 
 static void inject_interrupt(void *data)
 {
-    cpu_interrupt(current_env, (int)data);
+    cpu_interrupt(current_env, (long)data);
 }
 
 void kvm_inject_interrupt(CPUState *env, int mask)
 {
-    on_vcpu(env, inject_interrupt, (void *)mask);
+    on_vcpu(env, inject_interrupt, (void *)(long)mask);
 }
 
 void kvm_update_interrupt_request(CPUState *env)
-- 
1.6.3.rc4.29.g8146