[json-glib] format: Silence a compiler warning



commit 8ff4ca0a807e8bb04081bcf47e7a9951edd70ac9
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Feb 29 00:31:57 2016 +0000

    format: Silence a compiler warning

 json-glib/json-glib-format.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-glib-format.c b/json-glib/json-glib-format.c
index d39b325..177e8b3 100644
--- a/json-glib/json-glib-format.c
+++ b/json-glib/json-glib-format.c
@@ -114,7 +114,8 @@ format (JsonParser    *parser,
       p += written;
     }
 
-  write (STDOUT_FILENO, "\n", 1);
+  if (write (STDOUT_FILENO, "\n", 1) < 0)
+    g_error ("%s: %s", g_get_prgname (), g_strerror (errno));
 
   g_free (data);
 


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