summaryrefslogtreecommitdiffstats
path: root/audio/out/push.c
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-07 13:39:43 +0200
committerwm4 <wm4@nowhere>2016-06-07 14:12:33 +0200
commit5b5db336e93622dc4c54e02a42a39d1b3b1a9fbd (patch)
tree884d1b3e84ff5d51879ee351bc84aaadc024ada0 /audio/out/push.c
parent38ac5d5e7ba2e9a7234c45d431ef9b885f787a2c (diff)
downloadmpv-5b5db336e93622dc4c54e02a42a39d1b3b1a9fbd.tar.bz2
mpv-5b5db336e93622dc4c54e02a42a39d1b3b1a9fbd.tar.xz
build: silence -Wunused-result
For clang, it's enough to just put (void) around usages we are intentionally ignoring the result of. Since GCC does not seem to want to respect this decision, we are forced to disable the warning globally.
Diffstat (limited to 'audio/out/push.c')
-rw-r--r--audio/out/push.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/push.c b/audio/out/push.c
index 4fa2bc53d5..6884702108 100644
--- a/audio/out/push.c
+++ b/audio/out/push.c
@@ -489,7 +489,7 @@ int ao_wait_poll(struct ao *ao, struct pollfd *fds, int num_fds,
// flush the wakeup pipe contents - might "drown" some wakeups, but
// that's ok for our use-case
char buf[100];
- read(p->wakeup_pipe[0], buf, sizeof(buf));
+ (void)read(p->wakeup_pipe[0], buf, sizeof(buf));
}
return (r >= 0 || r == -EINTR) ? wakeup : -1;
}
@@ -499,7 +499,7 @@ void ao_wakeup_poll(struct ao *ao)
assert(ao->api == &ao_api_push);
struct ao_push_state *p = ao->api_priv;
- write(p->wakeup_pipe[1], &(char){0}, 1);
+ (void)write(p->wakeup_pipe[1], &(char){0}, 1);
}
#endif