mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
tests: silence warnings from pipe()
warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
1463a41f89
commit
2ccaf918ab
1 changed files with 5 additions and 3 deletions
|
|
@ -91,7 +91,8 @@ FAIL_TEST(sanity_fd_leak)
|
||||||
int fd[2];
|
int fd[2];
|
||||||
|
|
||||||
/* leak 2 file descriptors */
|
/* leak 2 file descriptors */
|
||||||
pipe(fd);
|
if (pipe(fd) < 0)
|
||||||
|
exit(EXIT_SUCCESS); /* failed to fail */
|
||||||
}
|
}
|
||||||
|
|
||||||
FAIL_TEST(sanity_fd_leak_exec)
|
FAIL_TEST(sanity_fd_leak_exec)
|
||||||
|
|
@ -100,7 +101,8 @@ FAIL_TEST(sanity_fd_leak_exec)
|
||||||
int nr_fds = count_open_fds();
|
int nr_fds = count_open_fds();
|
||||||
|
|
||||||
/* leak 2 file descriptors */
|
/* leak 2 file descriptors */
|
||||||
pipe(fd);
|
if (pipe(fd) < 0)
|
||||||
|
exit(EXIT_SUCCESS); /* failed to fail */
|
||||||
|
|
||||||
exec_fd_leak_check(nr_fds);
|
exec_fd_leak_check(nr_fds);
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +113,7 @@ TEST(sanity_fd_exec)
|
||||||
int nr_fds = count_open_fds();
|
int nr_fds = count_open_fds();
|
||||||
|
|
||||||
/* create 2 file descriptors, that should pass over exec */
|
/* create 2 file descriptors, that should pass over exec */
|
||||||
pipe(fd);
|
assert(pipe(fd) >= 0);
|
||||||
|
|
||||||
exec_fd_leak_check(nr_fds + 2);
|
exec_fd_leak_check(nr_fds + 2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue