From 085452f9d9bd0ce95ebf2beba91c3d62ab3fd97f Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Thu, 26 Apr 2018 08:40:18 +0000 Subject: [PATCH] Use correct printf format specifiers for ssize_t This unbreaks the build on armhf that otherwise fails like ../xwayland/selection/incoming.c: In function 'xwm_data_source_write': ../include/wlr/util/log.h:34:17: error: format '%ld' expects argument of type 'long int', but argument 6 has type 'ssize_t {aka int}' [-Werror=format=] _wlr_log(verb, "[%s:%d] " fmt, wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__) ^ ../xwayland/selection/incoming.c:34:2: note: in expansion of macro 'wlr_log' wlr_log(L_DEBUG, "wrote %zd (chunk size %ld) of %d bytes", ^~~~~~~ ../xwayland/selection/incoming.c:34:44: note: format string is defined here wlr_log(L_DEBUG, "wrote %zd (chunk size %ld) of %d bytes", ~~^ %d --- xwayland/selection/incoming.c | 2 +- xwayland/selection/outgoing.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c index ab06f40d..b2df3b53 100644 --- a/xwayland/selection/incoming.c +++ b/xwayland/selection/incoming.c @@ -31,7 +31,7 @@ static int xwm_data_source_write(int fd, uint32_t mask, void *data) { return 1; } - wlr_log(L_DEBUG, "wrote %ld (chunk size %ld) of %d bytes", + wlr_log(L_DEBUG, "wrote %zd (chunk size %zd) of %d bytes", transfer->property_start + len, len, xcb_get_property_value_length(transfer->property_reply)); diff --git a/xwayland/selection/outgoing.c b/xwayland/selection/outgoing.c index b612b2fb..6d7565e3 100644 --- a/xwayland/selection/outgoing.c +++ b/xwayland/selection/outgoing.c @@ -96,7 +96,7 @@ static int xwm_data_source_read(int fd, uint32_t mask, void *data) { goto error_out; } - wlr_log(L_DEBUG, "read %ld bytes (available %zu, mask 0x%x)", len, + wlr_log(L_DEBUG, "read %zd bytes (available %zu, mask 0x%x)", len, available, mask); transfer->source_data.size = current + len;