summaryrefslogtreecommitdiffstats
path: root/osdep/terminal-unix.c
diff options
context:
space:
mode:
authorllyyr <llyyr.public@gmail.com>2023-10-23 19:34:59 +0530
committersfan5 <sfan5@live.de>2023-10-24 22:49:22 +0200
commit06c26e37edbea4a9deb3c55f6f7b8ea10fea69e8 (patch)
tree6a6c48291a5d6908eb5d3fc7b9090031363bfe81 /osdep/terminal-unix.c
parent36403e5fd388f1421190ffe66da1eedfae5892ff (diff)
downloadmpv-06c26e37edbea4a9deb3c55f6f7b8ea10fea69e8.tar.bz2
mpv-06c26e37edbea4a9deb3c55f6f7b8ea10fea69e8.tar.xz
osdep: fix clang warnings with `_FORTIFY_SOURCE`
This fixes warnings generated for `-Wunused-result` when mpv is built with `-O1 -D_FORTIFY_SOURCE=1` or higher on clang since read/write functions are declared with the `warn_unused_result` attribute. Cast to void to avoid these warnings.
Diffstat (limited to 'osdep/terminal-unix.c')
-rw-r--r--osdep/terminal-unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 99073d90e2..d31e1e753f 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -435,7 +435,7 @@ static void *terminal_thread(void *ptr)
}
if (fds[1].revents & POLLIN) {
int8_t c = -1;
- read(stop_cont_pipe[0], &c, 1);
+ (void)read(stop_cont_pipe[0], &c, 1);
if (c == PIPE_STOP)
do_deactivate_getch2();
else if (c == PIPE_CONT)