[Spice-commits] gtk/spicy.c

Hans de Goede jwrdegoede at kemper.freedesktop.org
Wed Dec 19 06:57:51 PST 2012


 gtk/spicy.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 621732a3b666b0d36f8b1c4f4b904923952767bd
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Wed Dec 19 15:32:55 2012 +0100

    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 at redhat.com>

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)


More information about the Spice-commits mailing list