summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2012-03-22 11:49:35 +0200
committerPekka Paalanen <ppaalanen@gmail.com>2012-03-23 15:20:03 +0200
commit3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d (patch)
tree08d5f0e53c0388f0a2b3af2923013e33913bb0b6 /src
parentscanner: fix a signedness warning (diff)
downloadwayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.tar
wayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.tar.gz
wayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.tar.bz2
wayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.tar.lz
wayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.tar.xz
wayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.tar.zst
wayland-3b7cdcb5c6cbcd8e98c9c16632249b7e2905868d.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/connection.c2
-rw-r--r--src/wayland-client.c4
-rw-r--r--src/wayland-server.c2
-rw-r--r--src/wayland-shm.c2
-rw-r--r--src/wayland-util.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/connection.c b/src/connection.c
index 4ac5bf8..9bb2ca4 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -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);
diff --git a/src/wayland-client.c b/src/wayland-client.c
index 7814379..0be3a1a 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -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);
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 3b166c9..e62ba80 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -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;
diff --git a/src/wayland-shm.c b/src/wayland-shm.c
index 0c75cc9..24bf7a9 100644
--- a/src/wayland-shm.c
+++ b/src/wayland-shm.c
@@ -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)",
diff --git a/src/wayland-util.c b/src/wayland-util.c
index 06bd245..12391e2 100644
--- a/src/wayland-util.c
+++ b/src/wayland-util.c
@@ -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)