diff --git a/device_mapper/vdo/vdo_reader.c b/device_mapper/vdo/vdo_reader.c index 3f40bdfcb..48525b2ea 100644 --- a/device_mapper/vdo/vdo_reader.c +++ b/device_mapper/vdo/vdo_reader.c @@ -226,7 +226,7 @@ bool dm_vdo_parse_logical_size(const char *vdo_path, uint64_t *logical_blocks) size = st.st_size; } - if (read(fh, buffer, sizeof(buffer)) < (MAGIC_NUMBER_SIZE + sizeof(h))) { + if (read(fh, buffer, sizeof(buffer)) < (int)(MAGIC_NUMBER_SIZE + sizeof(h))) { log_sys_debug("read", vdo_path); goto err; } @@ -270,7 +270,7 @@ bool dm_vdo_parse_logical_size(const char *vdo_path, uint64_t *logical_blocks) goto err; } - if (read(fh, buffer, sizeof(buffer)) < (sizeof(struct vdo_geometry_block) + sizeof(vn))) { + if (read(fh, buffer, sizeof(buffer)) < (int)(sizeof(struct vdo_geometry_block) + sizeof(vn))) { log_sys_debug("read", vdo_path); goto err; } diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h index 01d000f26..20c2d9435 100644 --- a/test/lib/brick-shelltest.h +++ b/test/lib/brick-shelltest.h @@ -713,7 +713,8 @@ struct KMsg : Source { void transform( char *buf, ssize_t *sz ) { char newbuf[ buffer_size ]; struct tm time_info; - unsigned level, num, pos; + unsigned level, num; + int pos; unsigned long t; time_t tt; size_t len, slen; diff --git a/test/unit/matcher_t.c b/test/unit/matcher_t.c index 5b832caa2..c2853cff8 100644 --- a/test/unit/matcher_t.c +++ b/test/unit/matcher_t.c @@ -81,7 +81,7 @@ static void test_kabi_query(void *fixture) static const struct { const char *input; - int r; + unsigned r; } _cases[] = { {"foo", 0}, {"/dev/mapper/vg-lvol1", 0}, diff --git a/test/unit/radix_tree_t.c b/test/unit/radix_tree_t.c index 6b4494455..15876ffd4 100644 --- a/test/unit/radix_tree_t.c +++ b/test/unit/radix_tree_t.c @@ -530,8 +530,8 @@ static void test_remove_calls_dtr(void *fixture) for (i = 0; i < DTR_COUNT; i++) { bool found = false; do { - v.n = i; uint8_t *k = keys + (i * 3); + v.n = i; _gen_key(k, k + 3); if (!radix_tree_lookup(rt, k, 3, &v)) { T_ASSERT(radix_tree_insert(rt, k, 3, v)); @@ -584,8 +584,8 @@ static void test_destroy_calls_dtr(void *fixture) for (i = 0; i < DTR_COUNT; i++) { bool found = false; do { - v.n = i; uint8_t *k = keys + (i * 3); + v.n = i; _gen_key(k, k + 3); if (!radix_tree_lookup(rt, k, 3, &v)) { T_ASSERT(radix_tree_insert(rt, k, 3, v));