Skip to content

Use correct prinf format specifiers for ssize_t

Simon Ser requested to merge github/fork/agx/printf-ssize_t into master

Created by: agx

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

Merge request reports