Patchwork [4/8] w64: Fix compiler warnings (wrong format specifier)

login
register
mail settings
Submitter Stefan Hajnoczi
Date April 19, 2013, 11:33 a.m.
Message ID <1366371241-23430-5-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/237928/
State New
Headers show

Comments

Stefan Hajnoczi - April 19, 2013, 11:33 a.m.
From: Stefan Weil <sw@weilnetz.de>

GetLastError() returns a DWORD value which is unsigned long,
so the correct format specifier is %lu.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 cpus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index c15ff6c..5a98a37 100644
--- a/cpus.c
+++ b/cpus.c
@@ -865,7 +865,7 @@  static void qemu_cpu_kick_thread(CPUState *cpu)
         CONTEXT tcgContext;
 
         if (SuspendThread(cpu->hThread) == (DWORD)-1) {
-            fprintf(stderr, "qemu:%s: GetLastError:%d\n", __func__,
+            fprintf(stderr, "qemu:%s: GetLastError:%lu\n", __func__,
                     GetLastError());
             exit(1);
         }
@@ -881,7 +881,7 @@  static void qemu_cpu_kick_thread(CPUState *cpu)
         cpu_signal(0);
 
         if (ResumeThread(cpu->hThread) == (DWORD)-1) {
-            fprintf(stderr, "qemu:%s: GetLastError:%d\n", __func__,
+            fprintf(stderr, "qemu:%s: GetLastError:%lu\n", __func__,
                     GetLastError());
             exit(1);
         }