From 621732a3b666b0d36f8b1c4f4b904923952767bd Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2012 15:32:55 +0100 Subject: spicy: Fix compilation breaking due to a compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: spicy.c:1711:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] Signed-off-by: Hans de Goede --- gtk/spicy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/spicy.c b/gtk/spicy.c index dd8c970..3d9085f 100644 --- a/gtk/spicy.c +++ b/gtk/spicy.c @@ -1705,10 +1705,15 @@ end: static void port_data(SpicePortChannel *port, gpointer data, int size, spice_connection *conn) { + int r; + if (port != stdin_port) return; - write(fileno(stdout), data, size); + r = write(fileno(stdout), data, size); + if (r != size) { + g_warning("port write failed result %d/%d errno %d", r, size, errno); + } } static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data) -- cgit v1.2.3