changeset 20952:99b7f460f1c0

lib: Fix compiler warnings in test-ioloop Fixes: test-ioloop.c:72: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 24 Oct 2016 16:05:00 +0300
parents 1d037671b39a
children 8a09a379627e
files src/lib/test-ioloop.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/test-ioloop.c	Mon Oct 24 13:08:47 2016 +0300
+++ b/src/lib/test-ioloop.c	Mon Oct 24 16:05:00 2016 +0300
@@ -69,8 +69,9 @@
 
 	struct timeout *to = timeout_add(2000, test_ioloop_fd_to, &test_ctx);
 
-	(void)write(fds[0], "ltr", 3);
-	(void)write(fds[1], "rtl", 3);
+	if (write(fds[0], "ltr", 3) != 3 ||
+	    write(fds[1], "rtl", 3) != 3)
+		i_fatal("write() failed: %m");
 
 	io_loop_run(ioloop);