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

gcc: cleanup warnings

Correcting signess comparation.
Also use standalone /* fall through */ comment as that's
the only one supported by gcc to quiet warning.
This commit is contained in:
Zdenek Kabelac 2023-08-16 15:12:36 +02:00
parent 085c3821a8
commit 728617d25d
5 changed files with 8 additions and 7 deletions

View File

@ -266,7 +266,7 @@ static int do_local_work(void *data __attribute__((unused)))
RQ_TYPE(u_rq->request_type)); RQ_TYPE(u_rq->request_type));
break; break;
} }
/* ELSE, fall through */ /* ELSE */ /* fall through */
case DM_ULOG_IS_CLEAN: case DM_ULOG_IS_CLEAN:
case DM_ULOG_FLUSH: case DM_ULOG_FLUSH:
case DM_ULOG_MARK_REGION: case DM_ULOG_MARK_REGION:

View File

@ -1133,7 +1133,7 @@ uint32_t extents_from_percent_size(struct volume_group *vg, const struct dm_list
} }
break; break;
} }
/* fall through to use all PVs in VG like %FREE */ /* fall through */ /* to use all PVs in VG like %FREE */
case PERCENT_FREE: case PERCENT_FREE:
if (!(extents = vg->free_count)) { if (!(extents = vg->free_count)) {
log_error("No free extents in Volume group %s.", vg->name); log_error("No free extents in Volume group %s.", vg->name);

View File

@ -149,7 +149,8 @@ dm_bitset_t dm_bitset_parse_list(const char *str, struct dm_pool *mem,
size_t min_num_bits) size_t min_num_bits)
{ {
unsigned a, b; unsigned a, b;
int c, old_c, totaldigits, ndigits, nmaskbits; int c, old_c, totaldigits, ndigits;
size_t nmaskbits;
int at_start, in_range; int at_start, in_range;
dm_bitset_t mask = NULL; dm_bitset_t mask = NULL;
const char *start = str; const char *start = str;

View File

@ -1352,7 +1352,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
else else
image_count = lp->mirrors + 1; image_count = lp->mirrors + 1;
images_reduced = (image_count < lv_raid_image_count(lv)); images_reduced = (image_count < (int) lv_raid_image_count(lv));
if (image_count < 1) { if (image_count < 1) {
log_error("Unable to %s images by specified amount.", log_error("Unable to %s images by specified amount.",

View File

@ -1456,7 +1456,7 @@ static int _command_optional_opt_matches(struct cmd_context *cmd, int ci, int oo
} }
if (val_bit_is_set(commands[ci].optional_opt_args[oo].def.val_bits, constnum_VAL)) { if (val_bit_is_set(commands[ci].optional_opt_args[oo].def.val_bits, constnum_VAL)) {
if (commands[ci].optional_opt_args[oo].def.num == arg_int_value(cmd, opt_enum, 0)) if (commands[ci].optional_opt_args[oo].def.num == arg_uint64_value(cmd, opt_enum, 0))
return 1; return 1;
return 0; return 0;
} }
@ -1475,7 +1475,7 @@ static int _command_ignore_opt_matches(struct cmd_context *cmd, int ci, int io)
} }
if (val_bit_is_set(commands[ci].ignore_opt_args[io].def.val_bits, constnum_VAL)) { if (val_bit_is_set(commands[ci].ignore_opt_args[io].def.val_bits, constnum_VAL)) {
if (commands[ci].ignore_opt_args[io].def.num == arg_int_value(cmd, opt_enum, 0)) if (commands[ci].ignore_opt_args[io].def.num == arg_uint64_value(cmd, opt_enum, 0))
return 1; return 1;
return 0; return 0;
} }
@ -1519,7 +1519,7 @@ check_val:
} }
if (val_bit_is_set(commands[ci].required_opt_args[ro].def.val_bits, constnum_VAL)) { if (val_bit_is_set(commands[ci].required_opt_args[ro].def.val_bits, constnum_VAL)) {
if (commands[ci].required_opt_args[ro].def.num == arg_int_value(cmd, opt_enum, 0)) if (commands[ci].required_opt_args[ro].def.num == arg_uint64_value(cmd, opt_enum, 0))
return 1; return 1;
return 0; return 0;
} }