Skip to content

Commit 3414f58

Browse files
committed
Silence gcc warning
Signed-off-by: Jeremie Dimino <[email protected]>
1 parent c602dc2 commit 3414f58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/spawn_stubs.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ static void subprocess_failure(int failure_fd,
143143
{
144144
struct subprocess_failure failure;
145145
sigset_t sigset;
146+
size_t ignored;
146147

147148
CASSERT(sizeof(failure) < PIPE_BUF)
148149

@@ -156,7 +157,8 @@ static void subprocess_failure(int failure_fd,
156157

157158
/* Write is atomic as buffer is smaller than PIPE_BUF
158159
(required by POSIX.1-2001, as claimed in [man 7 pipe]) */
159-
write(failure_fd, &failure, sizeof(failure));
160+
/* We bind the result to silence the unused result warning */
161+
ignored = write(failure_fd, &failure, sizeof(failure));
160162
_exit(127);
161163
}
162164

0 commit comments

Comments
 (0)