Skip to content

Commit

Permalink
Silence gcc warning
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <[email protected]>
  • Loading branch information
jeremiedimino committed Apr 4, 2019
1 parent c602dc2 commit 3414f58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/spawn_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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);
}

Expand Down

0 comments on commit 3414f58

Please sign in to comment.