1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

gcc: do not mix signess compare

This commit is contained in:
Zdenek Kabelac 2024-11-06 00:03:53 +01:00
parent 2a1a7a863d
commit 0fc7266353
4 changed files with 7 additions and 6 deletions

View File

@ -226,7 +226,7 @@ bool dm_vdo_parse_logical_size(const char *vdo_path, uint64_t *logical_blocks)
size = st.st_size; 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); log_sys_debug("read", vdo_path);
goto err; goto err;
} }
@ -270,7 +270,7 @@ bool dm_vdo_parse_logical_size(const char *vdo_path, uint64_t *logical_blocks)
goto err; 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); log_sys_debug("read", vdo_path);
goto err; goto err;
} }

View File

@ -713,7 +713,8 @@ struct KMsg : Source {
void transform( char *buf, ssize_t *sz ) { void transform( char *buf, ssize_t *sz ) {
char newbuf[ buffer_size ]; char newbuf[ buffer_size ];
struct tm time_info; struct tm time_info;
unsigned level, num, pos; unsigned level, num;
int pos;
unsigned long t; unsigned long t;
time_t tt; time_t tt;
size_t len, slen; size_t len, slen;

View File

@ -81,7 +81,7 @@ static void test_kabi_query(void *fixture)
static const struct { static const struct {
const char *input; const char *input;
int r; unsigned r;
} _cases[] = { } _cases[] = {
{"foo", 0}, {"foo", 0},
{"/dev/mapper/vg-lvol1", 0}, {"/dev/mapper/vg-lvol1", 0},

View File

@ -530,8 +530,8 @@ static void test_remove_calls_dtr(void *fixture)
for (i = 0; i < DTR_COUNT; i++) { for (i = 0; i < DTR_COUNT; i++) {
bool found = false; bool found = false;
do { do {
v.n = i;
uint8_t *k = keys + (i * 3); uint8_t *k = keys + (i * 3);
v.n = i;
_gen_key(k, k + 3); _gen_key(k, k + 3);
if (!radix_tree_lookup(rt, k, 3, &v)) { if (!radix_tree_lookup(rt, k, 3, &v)) {
T_ASSERT(radix_tree_insert(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++) { for (i = 0; i < DTR_COUNT; i++) {
bool found = false; bool found = false;
do { do {
v.n = i;
uint8_t *k = keys + (i * 3); uint8_t *k = keys + (i * 3);
v.n = i;
_gen_key(k, k + 3); _gen_key(k, k + 3);
if (!radix_tree_lookup(rt, k, 3, &v)) { if (!radix_tree_lookup(rt, k, 3, &v)) {
T_ASSERT(radix_tree_insert(rt, k, 3, v)); T_ASSERT(radix_tree_insert(rt, k, 3, v));