Skip to content

Commit

Permalink
pipeto: nicer way to avoid warn_unused_result
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen committed Aug 20, 2024
1 parent 6adf988 commit c6e8c10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pipeto.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ pipeto(const char *cmdline)

// execvp failed, write errno to parent
int e = errno;
if (write(pipe1[1], &e, sizeof e) < 0)
exit(111); // do a magic dance for gcc -Wunused-result
(void)! write(pipe1[1], &e, sizeof e);
exit(111);
} else { // in parent
close(pipe1[1]);
Expand Down

0 comments on commit c6e8c10

Please sign in to comment.