From 5b5db336e93622dc4c54e02a42a39d1b3b1a9fbd Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 7 Jun 2016 13:39:43 +0200 Subject: 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. --- stream/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream') diff --git a/stream/stream.c b/stream/stream.c index 5e57ff701d..846765f326 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -978,7 +978,7 @@ struct mp_cancel *mp_cancel_new(void *talloc_ctx) void mp_cancel_trigger(struct mp_cancel *c) { atomic_store(&c->triggered, true); - write(c->wakeup_pipe[1], &(char){0}, 1); + (void)write(c->wakeup_pipe[1], &(char){0}, 1); } // Restore original state. (Allows reusing a mp_cancel.) -- cgit v1.2.3