public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compile time warnings in userspace component
@ 2007-08-13 17:27 Luca Tettamanti
       [not found] ` <20070813172735.GA12542-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Tettamanti @ 2007-08-13 17:27 UTC (permalink / raw)
  To: kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF8, Size: 3232 bytes --]

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

---

 qemu/hw/apic.c             |    4 ++++
 qemu/migration.c           |    8 ++++----
 qemu/qemu-kvm.c            |    2 +-
 qemu/target-i386/helper2.c |    4 ++++
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 2c686a5..523b6a8 100644
--- a/qemu/hw/apic.c
+++ b/qemu/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/qemu/migration.c b/qemu/migration.c
index ed1fd29..a759400 100644
--- a/qemu/migration.c
+++ b/qemu/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/qemu-kvm.c b/qemu/qemu-kvm.c
index 709e714..e23f477 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/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/qemu/target-i386/helper2.c b/qemu/target-i386/helper2.c
index 6217cd5..94833dd 100644
--- a/qemu/target-i386/helper2.c
+++ b/qemu/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


Luca
-- 
"Perché è così che ti frega, la vita. Ti piglia quando hai ancora l'anima
 addormentata e ti semina dentro un'immagine, o un odore, o un suono che
 poi non te lo togli più. E quella lì era la felicità."


[-- Attachment #2: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

end of thread, other threads:[~2007-08-15  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 17:27 [PATCH] Fix compile time warnings in userspace component Luca Tettamanti
     [not found] ` <20070813172735.GA12542-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2007-08-15  3:18   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox