From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Rami Rosen <rami.rosen@intel.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 06/10] ui: fix format specfier in vnc to avoid break in build.
Date: Tue, 31 Jan 2017 14:41:42 +0100 [thread overview]
Message-ID: <1485870106-25016-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1485870106-25016-1-git-send-email-kraxel@redhat.com>
From: Rami Rosen <rami.rosen@intel.com>
When building qemu after setting _VNC_DEBUG to 1 (see ui/vnc.h),
we get the following error and the build breaks:
...
ui/vnc.c: In function ‘vnc_client_io_error’:
ui/vnc.c:1262:13: error: format ‘%d’ expects argument of type ‘int’, but
VNC_DEBUG("Closing down client sock: ret %d (%s)\n",
^
cc1: all warnings being treated as errors
make: *** [ui/vnc.o] Error 1
...
This patch solves this issue by fixing the print format specifier
in vnc_client_io_error() to be %zd, which corresponds to the type
of the "ret" variable.
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Message-id: 1484039965-25907-1-git-send-email-rami.rosen@intel.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/vnc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index cf9b597..6854fdb 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1257,7 +1257,7 @@ ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp)
if (ret == 0) {
VNC_DEBUG("Closing down client sock: EOF\n");
} else if (ret != QIO_CHANNEL_ERR_BLOCK) {
- VNC_DEBUG("Closing down client sock: ret %d (%s)\n",
+ VNC_DEBUG("Closing down client sock: ret %zd (%s)\n",
ret, errp ? error_get_pretty(*errp) : "Unknown");
}
--
1.8.3.1
next prev parent reply other threads:[~2017-01-31 13:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 13:41 [Qemu-devel] [PULL 00/10] ui patch queue Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 01/10] qapi: add support for mice with extra/side buttons Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 02/10] ps2: " Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 03/10] ui: " Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 04/10] vnc: track LED state separately Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 05/10] ui/gtk: Fix mouse wheel on 3.4.0 or later Gerd Hoffmann
2017-01-31 13:41 ` Gerd Hoffmann [this message]
2017-01-31 13:41 ` [Qemu-devel] [PULL 07/10] ui/gtk.c: add ctrl-alt-= support for zoom in acceleration Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 08/10] spice: wakeup QXL worker to pick up mouse changes Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 09/10] vnc: fix overflow in vnc_update_stats Gerd Hoffmann
2017-01-31 13:41 ` [Qemu-devel] [PULL 10/10] gtk: Hardcode LC_CTYPE as C.utf-8 Gerd Hoffmann
2017-01-31 14:00 ` [Qemu-devel] [PULL 00/10] ui patch queue Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485870106-25016-7-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rami.rosen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).