From 7cc034c37d4f0f5194b46708fdebc1b0187d179b Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Mon, 11 Sep 2017 21:56:30 +0200 Subject: [PATCH] test: fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In function ‘send_a_byte_cb’: test/regress.c:1853:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] (void) write(*sockp, "A", 1); (cherry picked from commit 56010f37ae5b49881f7fd255d5c8a936e1c36909) --- test/regress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/regress.c b/test/regress.c index f86963fa..88e9b259 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1850,7 +1850,8 @@ static void send_a_byte_cb(evutil_socket_t fd, short what, void *arg) { evutil_socket_t *sockp = arg; (void) fd; (void) what; - (void) write(*sockp, "A", 1); + if (write(*sockp, "A", 1) < 0) + tt_fail_perror("write"); } struct read_not_timeout_param { -- 2.50.1