From 3414f58e7795e9b425965f6a1c68f26a16a20f57 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Thu, 4 Apr 2019 09:04:48 +0100 Subject: [PATCH] Silence gcc warning Signed-off-by: Jeremie Dimino --- src/spawn_stubs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spawn_stubs.c b/src/spawn_stubs.c index 92e7e9f..80e789a 100644 --- a/src/spawn_stubs.c +++ b/src/spawn_stubs.c @@ -143,6 +143,7 @@ static void subprocess_failure(int failure_fd, { struct subprocess_failure failure; sigset_t sigset; + size_t ignored; CASSERT(sizeof(failure) < PIPE_BUF) @@ -156,7 +157,8 @@ static void subprocess_failure(int failure_fd, /* Write is atomic as buffer is smaller than PIPE_BUF (required by POSIX.1-2001, as claimed in [man 7 pipe]) */ - write(failure_fd, &failure, sizeof(failure)); + /* We bind the result to silence the unused result warning */ + ignored = write(failure_fd, &failure, sizeof(failure)); _exit(127); }