summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-05-27 09:08:29 +0200
committerKristian Høgsberg <krh@bitplanet.net>2014-06-18 17:14:40 -0700
commit6ac60c17911ff416edcdeabf7800904765d3f59d (patch)
treeef71b38aa44c137dc23e599a342eccd96ae06cd4
parent0e6d9a771ac8b506b132e641fe1589f23cb1f650 (diff)
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>
-rw-r--r--src/compositor-wayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 76e5396f..a4dcec27 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -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;