Commit 1de20460 authored by Rusty Russell's avatar Rusty Russell

err: fix warn-unused-result warning in test (-O2)

/home/rusty/devel/cvs/ccan/ccan/err/test/run.c:124:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
  pipe(pfd);
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent e589d16b
......@@ -27,7 +27,8 @@ int main(int argc, char *argv[])
base = argv[0];
/* Test err() in child */
pipe(pfd);
if (pipe(pfd))
abort();
fflush(stdout);
if (fork()) {
char buffer[BUFFER_MAX+1];
......@@ -59,7 +60,8 @@ int main(int argc, char *argv[])
}
/* Test errx() in child */
pipe(pfd);
if (pipe(pfd))
abort();
fflush(stdout);
if (fork()) {
char buffer[BUFFER_MAX+1];
......@@ -89,7 +91,8 @@ int main(int argc, char *argv[])
/* Test warn() in child */
pipe(pfd);
if (pipe(pfd))
abort();
fflush(stdout);
if (fork()) {
char buffer[BUFFER_MAX+1];
......@@ -121,7 +124,8 @@ int main(int argc, char *argv[])
}
/* Test warnx() in child */
pipe(pfd);
if (pipe(pfd))
abort();
fflush(stdout);
if (fork()) {
char buffer[BUFFER_MAX+1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment