test: explicitly ignore the read() result from the timerfd/pidfd

We don't care about the actual read() being successful - it won't be on pidfd
and on timerfd it's just a timestamp we don't need.
This commit is contained in:
Peter Hutterer 2021-06-21 13:32:21 +10:00 committed by Wim Taymans
parent f9985636de
commit a4bdf83e39

View file

@ -870,7 +870,8 @@ static int monitor_test_forked(struct pwtest_test *t, pid_t pid, int read_fds[_F
if (e.data.fd == pidfd) {
uint64_t buf;
(void)read(pidfd, &buf, sizeof(buf)); /* for timerfd fallback */
int ignore SPA_UNUSED;
ignore = read(pidfd, &buf, sizeof(buf)); /* for timerfd fallback */
if (collect_child(t, pid))
break;
} else if (e.data.fd == timerfd) {