mirror of
https://github.com/glfw/glfw.git
synced 2024-11-14 06:23:50 +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)
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +217,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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user