1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

POSIX: Fix data type of return values

This commit is contained in:
Camilla Löwy 2022-03-22 20:11:42 +01:00
parent 955fbd9d26
commit 554cbdb205

View File

@ -113,7 +113,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;
}
@ -126,7 +126,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;
}