1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

gcc: match signed integers

This commit is contained in:
Zdenek Kabelac 2024-03-27 00:36:33 +01:00
parent 2b864aeb14
commit 0dbd90d74e
6 changed files with 11 additions and 10 deletions

View File

@ -4309,7 +4309,7 @@ static void _recalculate_fields(struct dm_report *rh)
struct row *row;
struct dm_report_field *field;
int len;
size_t id_len;
int id_len;
dm_list_iterate_items(row, &rh->rows) {
dm_list_iterate_items(field, &row->fields) {
@ -4326,7 +4326,7 @@ static void _recalculate_fields(struct dm_report *rh)
}
if (rh->flags & DM_REPORT_OUTPUT_FIELD_IDS_IN_HEADINGS) {
id_len = strlen(rh->fields[field->props->field_num].id);
id_len = (int) strlen(rh->fields[field->props->field_num].id);
if (field->props->width < id_len)
field->props->width = id_len;
}

View File

@ -1934,7 +1934,7 @@ static int _text_pv_initialise(const struct format_type *fmt,
return 0;
}
if (pva->label_sector != -1)
if (pva->label_sector != UINT64_C(-1))
pv->label_sector = pva->label_sector;
return 1;

View File

@ -2470,7 +2470,7 @@ static int _raid_reshape(struct logical_volume *lv,
* FIXME Use alternative mechanism - separate parameter or enum.
*/
static int _reshape_requested(const struct logical_volume *lv, const struct segment_type *segtype,
const int data_copies, const uint32_t region_size,
const uint32_t data_copies, const uint32_t region_size,
const uint32_t stripes, const uint32_t stripe_size)
{
struct lv_segment *seg = first_seg(lv);
@ -2917,7 +2917,8 @@ static int _raid_allow_extraction(struct logical_volume *lv,
int extract_count,
struct dm_list *target_pvs)
{
int s, redundancy = 0;
int redundancy = 0;
unsigned s;
char *dev_health;
char *sync_action;
struct lv_segment *seg = first_seg(lv);
@ -6370,7 +6371,7 @@ static int _conversion_options_allowed(const struct lv_segment *seg_from,
const struct segment_type **segtype_to,
int yes,
uint32_t new_image_count,
int new_data_copies, int new_region_size,
int new_data_copies, uint32_t new_region_size,
uint32_t *stripes, unsigned new_stripe_size_supplied)
{
int r = 1;

View File

@ -4308,7 +4308,7 @@ static void _recalculate_fields(struct dm_report *rh)
struct row *row;
struct dm_report_field *field;
int len;
size_t id_len;
int id_len;
dm_list_iterate_items(row, &rh->rows) {
dm_list_iterate_items(field, &row->fields) {
@ -4325,7 +4325,7 @@ static void _recalculate_fields(struct dm_report *rh)
}
if (rh->flags & DM_REPORT_OUTPUT_FIELD_IDS_IN_HEADINGS) {
id_len = strlen(rh->fields[field->props->field_num].id);
id_len = (int) strlen(rh->fields[field->props->field_num].id);
if (field->props->width < id_len)
field->props->width = id_len;
}

View File

@ -4638,7 +4638,7 @@ static int _stats_unmap_regions(struct dm_stats *dms, uint64_t group_id,
log_very_verbose("Kept region " FMTu64, i);
} else {
if (i == group_id)
if (i == (int64_t)group_id)
*regroup = 1;
if (!_stats_delete_region(dms, i)) {

View File

@ -1421,7 +1421,7 @@ static void _create_opt_names_alpha(void)
qsort(opt_names_alpha, ARG_COUNT, sizeof(long), _long_name_compare);
}
static int _copy_line(const char **line, int max_line, int *position)
static int _copy_line(const char **line, size_t max_line, int *position)
{
size_t len;