qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 1.7] qga: Fix two format strings for MinGW
@ 2013-11-25 19:54 Stefan Weil
  0 siblings, 0 replies; only message in thread
From: Stefan Weil @ 2013-11-25 19:54 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel

Both code locations cause a compiler warning. Using "%s" instead of "%lu"
would result in a program crash if the wrong code were executed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 qga/commands-win32.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 7a37f5c..a6a0af2 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -110,7 +110,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err)
     }
 
     if (!ExitWindowsEx(shutdown_flag, SHTDN_REASON_FLAG_PLANNED)) {
-        slog("guest-shutdown failed: %d", GetLastError());
+        slog("guest-shutdown failed: %lu", GetLastError());
         error_set(err, QERR_UNDEFINED_ERROR);
     }
 }
@@ -301,7 +301,7 @@ static DWORD WINAPI do_suspend(LPVOID opaque)
     DWORD ret = 0;
 
     if (!SetSuspendState(*mode == GUEST_SUSPEND_MODE_DISK, TRUE, TRUE)) {
-        slog("failed to suspend guest, %s", GetLastError());
+        slog("failed to suspend guest, %lu", GetLastError());
         ret = -1;
     }
     g_free(mode);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-25 19:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 19:54 [Qemu-devel] [PATCH for 1.7] qga: Fix two format strings for MinGW Stefan Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).