Replace %m conversion specifier with %s and strerror()

When compiling with `-Wall` and `-pedantic-errors`, gcc complains with
```
warning: ISO C does not support the '%m' gnu_printf format [-Wformat=]
```
because the `%m` conversion specifier is a GNU extension.

Closes #1702.
This commit is contained in:
Luflosi 2020-05-25 15:42:52 +02:00 committed by linkmauve
parent 91eebe922d
commit d4f5074535

View File

@ -142,8 +142,8 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
if (fd < 0) if (fd < 0)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Creating a buffer file for %d B failed: %m", "Wayland: Creating a buffer file for %d B failed: %s",
length); length, strerror(errno));
return NULL; return NULL;
} }
@ -151,7 +151,7 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
if (data == MAP_FAILED) if (data == MAP_FAILED)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: mmap failed: %m"); "Wayland: mmap failed: %s", strerror(errno));
close(fd); close(fd);
return NULL; return NULL;
} }