mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
Fix harmless signedness warnings
Trivially silence all the harmless (i.e. would have been correct also without this fix) compiler warnings: warning: comparison between signed and unsigned integer expressions Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
cc4750b7df
commit
3b7cdcb5c6
5 changed files with 6 additions and 6 deletions
|
|
@ -546,7 +546,7 @@ wl_connection_demarshal(struct wl_connection *connection,
|
|||
struct wl_closure *closure = &connection->receive_closure;
|
||||
|
||||
count = strlen(message->signature) + 2;
|
||||
if (count > ARRAY_LENGTH(closure->types)) {
|
||||
if (count > (int)ARRAY_LENGTH(closure->types)) {
|
||||
printf("too many args (%d)\n", count);
|
||||
errno = EINVAL;
|
||||
wl_connection_consume(connection, size);
|
||||
|
|
|
|||
|
|
@ -507,14 +507,14 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
|
|||
len = wl_connection_data(display->connection, mask);
|
||||
|
||||
while (len > 0) {
|
||||
if (len < sizeof p)
|
||||
if ((uint32_t)len < sizeof p)
|
||||
break;
|
||||
|
||||
wl_connection_copy(display->connection, p, sizeof p);
|
||||
object = p[0];
|
||||
opcode = p[1] & 0xffff;
|
||||
size = p[1] >> 16;
|
||||
if (len < size)
|
||||
if ((uint32_t)len < size)
|
||||
break;
|
||||
|
||||
handle_event(display, object, opcode, size);
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
|
|||
return 1;
|
||||
}
|
||||
|
||||
while (len >= sizeof p) {
|
||||
while (len >= (int)sizeof p) {
|
||||
wl_connection_copy(connection, p, sizeof p);
|
||||
opcode = p[1] & 0xffff;
|
||||
size = p[1] >> 16;
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ shm_create_buffer(struct wl_client *client, struct wl_resource *resource,
|
|||
return;
|
||||
}
|
||||
|
||||
if (width < 0 || height < 0 || stride < width) {
|
||||
if (width < 0 || height < 0 || stride < (uint32_t)width) {
|
||||
wl_resource_post_error(resource,
|
||||
WL_SHM_ERROR_INVALID_STRIDE,
|
||||
"invalid width, height or stride (%dx%d, %u)",
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ wl_array_release(struct wl_array *array)
|
|||
WL_EXPORT void *
|
||||
wl_array_add(struct wl_array *array, int size)
|
||||
{
|
||||
int alloc;
|
||||
uint32_t alloc;
|
||||
void *data, *p;
|
||||
|
||||
if (array->alloc > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue