mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
POSIX: Fix data type of return values
(cherry picked from commit 554cbdb205
)
This commit is contained in:
parent
307ccd68a5
commit
8897c8a1cb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user