[PATCH spice-gtk] spicy: Fix compilation breaking due to a compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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)
-- 
1.8.0.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]