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. --- osdep/terminal-unix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'osdep/terminal-unix.c') diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index 3c2784bacd..e62903055a 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -275,7 +275,7 @@ static void enable_kx(bool enable) // shouldn't be relied on here either. if (isatty(STDOUT_FILENO)) { char *cmd = enable ? "\033=" : "\033>"; - write(STDOUT_FILENO, cmd, strlen(cmd)); + (void)write(STDOUT_FILENO, cmd, strlen(cmd)); } } @@ -378,7 +378,7 @@ static void quit_request_sighandler(int signum) { do_deactivate_getch2(); - write(death_pipe[1], &(char){0}, 1); + (void)write(death_pipe[1], &(char){0}, 1); } static void *terminal_thread(void *ptr) @@ -450,7 +450,7 @@ void terminal_uninit(void) do_deactivate_getch2(); if (input_ctx) { - write(death_pipe[1], &(char){0}, 1); + (void)write(death_pipe[1], &(char){0}, 1); pthread_join(input_thread, NULL); close(death_pipe[0]); close(death_pipe[1]); -- cgit v1.2.3