From 78666cc696195cf2c9d72ea27b7d58af91b8bf41 Mon Sep 17 00:00:00 2001 From: Luca Tettamanti Date: Mon, 13 Aug 2007 19:27:35 +0200 Subject: Fix compile time warnings in userspace component Fix a few trivial warnings: - use %zu when printing size_t arguments in printf - include qemu-kvm.h where appropriate - change the return type of kvm_eat_signals Signed-off-by: Luca Tettamanti Signed-off-by: Avi Kivity --- hw/apic.c | 4 ++++ migration.c | 8 ++++---- qemu-kvm.c | 2 +- target-i386/helper2.c | 4 ++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index f1b2a487f..dc92f8a70 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -19,6 +19,10 @@ */ #include "vl.h" +#ifdef USE_KVM +#include "../qemu-kvm.h" +#endif + //#define DEBUG_APIC //#define DEBUG_IOAPIC diff --git a/migration.c b/migration.c index ed1fd290c..cb866d7fc 100644 --- a/migration.c +++ b/migration.c @@ -686,7 +686,7 @@ wait_for_ack: goto wait_for_ack; if (len != 1 || status != 0) { *s->has_error = MIG_STAT_READ_FAILED; - fprintf(stderr, "migration: wait_for_ack: read error l=%ld s=%d(%s)\n", + fprintf(stderr, "migration: wait_for_ack: read error l=%zu s=%d(%s)\n", len, status, strerror(errno)); goto out; } @@ -696,7 +696,7 @@ send_go: if (len == -1 && errno == EINTR) goto send_go; if (len != 1) { - fprintf(stderr, "migration: send_go: write error l=%ld(%s)\n", + fprintf(stderr, "migration: send_go: write error l=%zu (%s)\n", len, strerror(errno)); *s->has_error = MIG_STAT_WRITE_FAILED; } @@ -918,7 +918,7 @@ send_ack: if (len == -1 && errno == EAGAIN) goto send_ack; if (len != 1) { - fprintf(stderr, "migration: send_ack: write error len=%ld (%s)\n", + fprintf(stderr, "migration: send_ack: write error len=%zu (%s)\n", len, strerror(errno)); rc = MIG_STAT_DST_WRITE_FAILED; goto error_accept; @@ -936,7 +936,7 @@ wait_for_go: goto wait_for_go; if (len != 1) { rc = MIG_STAT_DST_READ_FAILED; - fprintf(stderr, "migration: wait_for_go: read error len=%ld (%s)\n", + fprintf(stderr, "migration: wait_for_go: read error len=%zu (%s)\n", len, strerror(errno)); } diff --git a/qemu-kvm.c b/qemu-kvm.c index 709e714c5..e23f4774e 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -591,7 +591,7 @@ static int kvm_eat_signal(CPUState *env, int timeout) } -static int kvm_eat_signals(CPUState *env, int timeout) +static void kvm_eat_signals(CPUState *env, int timeout) { int r = 0; diff --git a/target-i386/helper2.c b/target-i386/helper2.c index 6217cd531..94833dd5f 100644 --- a/target-i386/helper2.c +++ b/target-i386/helper2.c @@ -28,6 +28,10 @@ #include "cpu.h" #include "exec-all.h" +#ifdef USE_KVM +#include "../qemu-kvm.h" +#endif + //#define DEBUG_MMU #ifdef USE_CODE_COPY -- cgit v1.2.3