提交 16f4e8fa 编写于 作者: S Stefan Weil 提交者: Anthony Liguori

qga: Fix two format strings for MinGW

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: NStefan Weil <sw@weilnetz.de>
Message-id: 1385409257-2522-1-git-send-email-sw@weilnetz.de
Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
上级 84dc96e1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册