mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-11 13:10:32 +00:00
pipeto: nicer way to avoid warn_unused_result
From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c34
This commit is contained in:
parent
6adf988980
commit
c6e8c10ead
3
pipeto.c
3
pipeto.c
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user