mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 14:24:35 +00:00
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.
(cherry picked from commit d4f5074535
)
This commit is contained in:
parent
8b63ca53de
commit
a8e5c530ee
@ -208,8 +208,8 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
|
||||
if (fd < 0)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Creating a buffer file for %d B failed: %m",
|
||||
length);
|
||||
"Wayland: Creating a buffer file for %d B failed: %s",
|
||||
length, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ static struct wl_buffer* createShmBuffer(const GLFWimage* image)
|
||||
if (data == MAP_FAILED)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: mmap failed: %m");
|
||||
"Wayland: mmap failed: %s", strerror(errno));
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user