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. --- player/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/client.c') diff --git a/player/client.c b/player/client.c index 45bd2297ba..f5a321b41d 100644 --- a/player/client.c +++ b/player/client.c @@ -280,7 +280,7 @@ static void wakeup_client(struct mpv_handle *ctx) if (ctx->wakeup_cb) ctx->wakeup_cb(ctx->wakeup_cb_ctx); if (ctx->wakeup_pipe[0] != -1) - write(ctx->wakeup_pipe[1], &(char){0}, 1); + (void)write(ctx->wakeup_pipe[1], &(char){0}, 1); } pthread_mutex_unlock(&ctx->wakeup_lock); } @@ -1559,7 +1559,7 @@ int mpv_get_wakeup_pipe(mpv_handle *ctx) pthread_mutex_lock(&ctx->wakeup_lock); if (ctx->wakeup_pipe[0] == -1) { if (mp_make_wakeup_pipe(ctx->wakeup_pipe) >= 0) - write(ctx->wakeup_pipe[1], &(char){0}, 1); + (void)write(ctx->wakeup_pipe[1], &(char){0}, 1); } int fd = ctx->wakeup_pipe[0]; pthread_mutex_unlock(&ctx->wakeup_lock); -- cgit v1.2.3