backend: unbreak on 32-bit architectures

backend/headless/output.c:132:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                ++backend->last_output_num);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
backend/noop/output.c:72:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                ++backend->last_output_num);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
backend/wayland/output.c:294:3: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                ++backend->last_output_num);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
backend/x11/output.c:150:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                ++x11->last_output_num);
                ^~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Jan Beich 2019-04-08 18:49:25 +00:00 committed by Drew DeVault
parent 670c787fa7
commit b6d0de177a
4 changed files with 4 additions and 4 deletions

View file

@ -128,7 +128,7 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
output_set_custom_mode(wlr_output, width, height, 0); output_set_custom_mode(wlr_output, width, height, 0);
strncpy(wlr_output->make, "headless", sizeof(wlr_output->make)); strncpy(wlr_output->make, "headless", sizeof(wlr_output->make));
strncpy(wlr_output->model, "headless", sizeof(wlr_output->model)); strncpy(wlr_output->model, "headless", sizeof(wlr_output->model));
snprintf(wlr_output->name, sizeof(wlr_output->name), "HEADLESS-%ld", snprintf(wlr_output->name, sizeof(wlr_output->name), "HEADLESS-%zd",
++backend->last_output_num); ++backend->last_output_num);
if (!wlr_egl_make_current(&output->backend->egl, output->egl_surface, if (!wlr_egl_make_current(&output->backend->egl, output->egl_surface,

View file

@ -68,7 +68,7 @@ struct wlr_output *wlr_noop_add_output(struct wlr_backend *wlr_backend) {
strncpy(wlr_output->make, "noop", sizeof(wlr_output->make)); strncpy(wlr_output->make, "noop", sizeof(wlr_output->make));
strncpy(wlr_output->model, "noop", sizeof(wlr_output->model)); strncpy(wlr_output->model, "noop", sizeof(wlr_output->model));
snprintf(wlr_output->name, sizeof(wlr_output->name), "NOOP-%ld", snprintf(wlr_output->name, sizeof(wlr_output->name), "NOOP-%zd",
++backend->last_output_num); ++backend->last_output_num);
wl_list_insert(&backend->outputs, &output->link); wl_list_insert(&backend->outputs, &output->link);

View file

@ -290,7 +290,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {
wlr_output_update_custom_mode(wlr_output, 1280, 720, 0); wlr_output_update_custom_mode(wlr_output, 1280, 720, 0);
strncpy(wlr_output->make, "wayland", sizeof(wlr_output->make)); strncpy(wlr_output->make, "wayland", sizeof(wlr_output->make));
strncpy(wlr_output->model, "wayland", sizeof(wlr_output->model)); strncpy(wlr_output->model, "wayland", sizeof(wlr_output->model));
snprintf(wlr_output->name, sizeof(wlr_output->name), "WL-%lu", snprintf(wlr_output->name, sizeof(wlr_output->name), "WL-%zd",
++backend->last_output_num); ++backend->last_output_num);
output->backend = backend; output->backend = backend;

View file

@ -146,7 +146,7 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
output_set_refresh(&output->wlr_output, 0); output_set_refresh(&output->wlr_output, 0);
snprintf(wlr_output->name, sizeof(wlr_output->name), "X11-%ld", snprintf(wlr_output->name, sizeof(wlr_output->name), "X11-%zd",
++x11->last_output_num); ++x11->last_output_num);
parse_xcb_setup(wlr_output, x11->xcb); parse_xcb_setup(wlr_output, x11->xcb);