From 8ff4ca0a807e8bb04081bcf47e7a9951edd70ac9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 29 Feb 2016 00:31:57 +0000 Subject: format: Silence a compiler warning --- json-glib/json-glib-format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'json-glib/json-glib-format.c') 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); -- cgit v1.2.1