mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Fix incorrect format parameters
This commit is contained in:
parent
39fd2335bf
commit
d9bb792794
13 changed files with 45 additions and 43 deletions
|
|
@ -267,7 +267,7 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat,
|
|||
for (size_t i = 0; i < num_keycodes; ++i) {
|
||||
uint32_t *p = wl_array_add(&keys, sizeof(uint32_t));
|
||||
if (!p) {
|
||||
wlr_log(WLR_ERROR, "Cannot allocate memory, skipping keycode: %d\n",
|
||||
wlr_log(WLR_ERROR, "Cannot allocate memory, skipping keycode: %" PRIu32 "\n",
|
||||
keycodes[i]);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -449,7 +449,7 @@ void seat_client_create_keyboard(struct wlr_seat_client *seat_client,
|
|||
for (size_t i = 0; i < num_keycodes; ++i) {
|
||||
uint32_t *p = wl_array_add(&keys, sizeof(uint32_t));
|
||||
if (!p) {
|
||||
wlr_log(WLR_ERROR, "Cannot allocate memory, skipping keycode: %d\n",
|
||||
wlr_log(WLR_ERROR, "Cannot allocate memory, skipping keycode: %" PRIu32 "\n",
|
||||
keycodes[i]);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static void subcompositor_handle_get_subsurface(struct wl_client *client,
|
|||
if (surface == parent) {
|
||||
wl_resource_post_error(resource,
|
||||
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE,
|
||||
"%s%d: wl_surface@%d cannot be its own parent",
|
||||
"%s%" PRIu32 ": wl_surface@%" PRIu32 " cannot be its own parent",
|
||||
msg, id, wl_resource_get_id(surface_resource));
|
||||
return;
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ static void subcompositor_handle_get_subsurface(struct wl_client *client,
|
|||
wlr_subsurface_from_wlr_surface(surface) != NULL) {
|
||||
wl_resource_post_error(resource,
|
||||
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE,
|
||||
"%s%d: wl_surface@%d is already a sub-surface",
|
||||
"%s%" PRIu32 ": wl_surface@%" PRIu32 " is already a sub-surface",
|
||||
msg, id, wl_resource_get_id(surface_resource));
|
||||
return;
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ static void subcompositor_handle_get_subsurface(struct wl_client *client,
|
|||
if (wlr_surface_get_root_surface(parent) == surface) {
|
||||
wl_resource_post_error(resource,
|
||||
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE,
|
||||
"%s%d: wl_surface@%d is an ancestor of parent",
|
||||
"%s%" PRIu32 ": wl_surface@%" PRIu32 " is an ancestor of parent",
|
||||
msg, id, wl_resource_get_id(surface_resource));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ static void layer_surface_handle_ack_configure(struct wl_client *client,
|
|||
if (!found) {
|
||||
wl_resource_post_error(resource,
|
||||
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SURFACE_STATE,
|
||||
"wrong configure serial: %u", serial);
|
||||
"wrong configure serial: %" PRIu32, serial);
|
||||
return;
|
||||
}
|
||||
// Then remove old configures from the list
|
||||
|
|
@ -114,7 +114,7 @@ static void layer_surface_handle_set_anchor(struct wl_client *client,
|
|||
if (anchor > max_anchor) {
|
||||
wl_resource_post_error(resource,
|
||||
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_ANCHOR,
|
||||
"invalid anchor %d", anchor);
|
||||
"invalid anchor %" PRIu32, anchor);
|
||||
}
|
||||
struct wlr_layer_surface_v1 *surface = layer_surface_from_resource(resource);
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ static void layer_surface_set_layer(struct wl_client *client,
|
|||
if (layer > ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) {
|
||||
wl_resource_post_error(surface->resource,
|
||||
ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER,
|
||||
"Invalid layer %d", layer);
|
||||
"Invalid layer %" PRIu32, layer);
|
||||
return;
|
||||
}
|
||||
surface->client_pending.layer = layer;
|
||||
|
|
@ -403,7 +403,7 @@ static void layer_shell_handle_get_layer_surface(struct wl_client *wl_client,
|
|||
free(surface);
|
||||
wl_resource_post_error(client_resource,
|
||||
ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER,
|
||||
"Invalid layer %d", layer);
|
||||
"Invalid layer %" PRIu32, layer);
|
||||
return;
|
||||
}
|
||||
surface->namespace = strdup(namespace);
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ static void params_create_common(struct wl_client *client,
|
|||
if (buffer->attributes.offset[i] > size) {
|
||||
wl_resource_post_error(params_resource,
|
||||
ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS,
|
||||
"invalid offset %i for plane %d",
|
||||
"invalid offset %" PRIu32 " for plane %d",
|
||||
buffer->attributes.offset[i], i);
|
||||
goto err_out;
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ static void params_create_common(struct wl_client *client,
|
|||
buffer->attributes.stride[i] == 0) {
|
||||
wl_resource_post_error(params_resource,
|
||||
ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS,
|
||||
"invalid stride %i for plane %d",
|
||||
"invalid stride %" PRIu32 " for plane %d",
|
||||
buffer->attributes.stride[i], i);
|
||||
goto err_out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -712,7 +712,7 @@ bool wlr_surface_set_role(struct wlr_surface *surface,
|
|||
if (surface->role != NULL && surface->role != role) {
|
||||
if (error_resource != NULL) {
|
||||
wl_resource_post_error(error_resource, error_code,
|
||||
"Cannot assign role %s to wl_surface@%d, already has role %s\n",
|
||||
"Cannot assign role %s to wl_surface@%" PRIu32 ", already has role %s\n",
|
||||
role->name, wl_resource_get_id(surface->resource),
|
||||
surface->role->name);
|
||||
}
|
||||
|
|
@ -720,7 +720,7 @@ bool wlr_surface_set_role(struct wlr_surface *surface,
|
|||
}
|
||||
if (surface->role_data != NULL && surface->role_data != role_data) {
|
||||
wl_resource_post_error(error_resource, error_code,
|
||||
"Cannot reassign role %s to wl_surface@%d,"
|
||||
"Cannot reassign role %s to wl_surface@%" PRIu32 ","
|
||||
"role object still exists", role->name,
|
||||
wl_resource_get_id(surface->resource));
|
||||
return false;
|
||||
|
|
@ -791,7 +791,7 @@ static void subsurface_handle_place_above(struct wl_client *client,
|
|||
if (!sibling) {
|
||||
wl_resource_post_error(subsurface->resource,
|
||||
WL_SUBSURFACE_ERROR_BAD_SURFACE,
|
||||
"%s: wl_surface@%d is not a parent or sibling",
|
||||
"%s: wl_surface@%" PRIu32 "is not a parent or sibling",
|
||||
"place_above", wl_resource_get_id(sibling_surface->resource));
|
||||
return;
|
||||
}
|
||||
|
|
@ -818,7 +818,7 @@ static void subsurface_handle_place_below(struct wl_client *client,
|
|||
if (!sibling) {
|
||||
wl_resource_post_error(subsurface->resource,
|
||||
WL_SUBSURFACE_ERROR_BAD_SURFACE,
|
||||
"%s: wl_surface@%d is not a parent or sibling",
|
||||
"%s: wl_surface@%" PRIu32 " is not a parent or sibling",
|
||||
"place_below", wl_resource_get_id(sibling_surface->resource));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void virtual_pointer_axis(struct wl_client *client,
|
|||
if (axis > WL_POINTER_AXIS_HORIZONTAL_SCROLL) {
|
||||
wl_resource_post_error(resource,
|
||||
ZWLR_VIRTUAL_POINTER_V1_ERROR_INVALID_AXIS,
|
||||
"Invalid enumeration value %d", axis);
|
||||
"Invalid enumeration value %" PRIu32, axis);
|
||||
return;
|
||||
}
|
||||
struct wlr_virtual_pointer_v1 *pointer =
|
||||
|
|
@ -140,7 +140,7 @@ static void virtual_pointer_axis_source(struct wl_client *client,
|
|||
if (source > WL_POINTER_AXIS_SOURCE_WHEEL_TILT) {
|
||||
wl_resource_post_error(resource,
|
||||
ZWLR_VIRTUAL_POINTER_V1_ERROR_INVALID_AXIS_SOURCE,
|
||||
"Invalid enumeration value %d", source);
|
||||
"Invalid enumeration value %" PRIu32, source);
|
||||
return;
|
||||
}
|
||||
struct wlr_virtual_pointer_v1 *pointer =
|
||||
|
|
@ -158,7 +158,7 @@ static void virtual_pointer_axis_stop(struct wl_client *client,
|
|||
if (axis > WL_POINTER_AXIS_HORIZONTAL_SCROLL) {
|
||||
wl_resource_post_error(resource,
|
||||
ZWLR_VIRTUAL_POINTER_V1_ERROR_INVALID_AXIS,
|
||||
"Invalid enumeration value %d", axis);
|
||||
"Invalid enumeration value %" PRIu32, axis);
|
||||
return;
|
||||
}
|
||||
struct wlr_virtual_pointer_v1 *pointer =
|
||||
|
|
@ -182,7 +182,7 @@ static void virtual_pointer_axis_discrete(struct wl_client *client,
|
|||
if (axis > WL_POINTER_AXIS_HORIZONTAL_SCROLL) {
|
||||
wl_resource_post_error(resource,
|
||||
ZWLR_VIRTUAL_POINTER_V1_ERROR_INVALID_AXIS,
|
||||
"Invalid enumeration value %d", axis);
|
||||
"Invalid enumeration value %" PRIu32, axis);
|
||||
return;
|
||||
}
|
||||
struct wlr_virtual_pointer_v1 *pointer =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue