mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 06:28:01 +02:00
compositor-wayland: Fix compiler warning
sizeof returns size_t, for which the correct printf specifier is %zu.
Fixes the following warning when building for ARMv7.
src/compositor-wayland.c: In function 'wayland_output_get_shm_buffer':
src/compositor-wayland.c:260:3: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'unsigned int' [-Wformat=]
weston_log("could not zalloc %ld memory for sb: %m\n", sizeof *sb);
^
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
0e6d9a771a
commit
6ac60c1791
1 changed files with 1 additions and 1 deletions
|
|
@ -257,7 +257,7 @@ wayland_output_get_shm_buffer(struct wayland_output *output)
|
|||
|
||||
sb = zalloc(sizeof *sb);
|
||||
if (sb == NULL) {
|
||||
weston_log("could not zalloc %ld memory for sb: %m\n", sizeof *sb);
|
||||
weston_log("could not zalloc %zu memory for sb: %m\n", sizeof *sb);
|
||||
close(fd);
|
||||
free(data);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue