diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-12-19 15:32:55 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-12-19 15:34:49 +0100 |
commit | 621732a3b666b0d36f8b1c4f4b904923952767bd (patch) | |
tree | a29277a7700102b85cb120f76e748f8702c94786 | |
parent | ca62a19da82b50259cdf21d792a9663606237eb0 (diff) |
spicy: Fix compilation breaking due to a compiler warning
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 <hdegoede@redhat.com>
-rw-r--r-- | gtk/spicy.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) |