aboutsummaryrefslogtreecommitdiffhomepage
path: root/osdep
diff options
context:
space:
mode:
authorGravatar Niklas Haas <git@nand.wakku.to>2016-06-07 13:39:43 +0200
committerGravatar wm4 <wm4@nowhere>2016-06-07 14:12:33 +0200
commit5b5db336e93622dc4c54e02a42a39d1b3b1a9fbd (patch)
tree884d1b3e84ff5d51879ee351bc84aaadc024ada0 /osdep
parent38ac5d5e7ba2e9a7234c45d431ef9b885f787a2c (diff)
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 'osdep')
-rw-r--r--osdep/terminal-unix.c6
1 files changed, 3 insertions, 3 deletions
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]);