diff options
author | Luca Tettamanti <kronos.it@gmail.com> | 2007-08-13 19:27:35 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-08-15 06:17:30 +0300 |
commit | 78666cc696195cf2c9d72ea27b7d58af91b8bf41 (patch) | |
tree | 5ddcba262a5ac85edc94519016bd0128ec061734 | |
parent | 28315e7565dc43a4c05b022fa94e199d3aaf22a4 (diff) |
Fix compile time warnings in userspace componentkvm-35
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 <kronos.it@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | hw/apic.c | 4 | ||||
-rw-r--r-- | migration.c | 8 | ||||
-rw-r--r-- | qemu-kvm.c | 2 | ||||
-rw-r--r-- | target-i386/helper2.c | 4 |
4 files changed, 13 insertions, 5 deletions
@@ -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 |