From 8897c8a1cb7fed20789e4d054295220b9c1b3348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 22 Mar 2022 20:11:42 +0100 Subject: [PATCH] POSIX: Fix data type of return values (cherry picked from commit 554cbdb205d71ab09873f887bb75a8a7d3731a0c) --- src/x11_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index ce089d0d..646fbdab 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -164,7 +164,7 @@ static void writeEmptyEvent(void) for (;;) { const char byte = 0; - const int result = write(_glfw.x11.emptyEventPipe[1], &byte, 1); + const ssize_t result = write(_glfw.x11.emptyEventPipe[1], &byte, 1); if (result == 1 || (result == -1 && errno != EINTR)) break; } @@ -177,7 +177,7 @@ static void drainEmptyEvents(void) for (;;) { char dummy[64]; - const int result = read(_glfw.x11.emptyEventPipe[0], dummy, sizeof(dummy)); + const ssize_t result = read(_glfw.x11.emptyEventPipe[0], dummy, sizeof(dummy)); if (result == -1 && errno != EINTR) break; }