From e3dff2cba22086988fef1d8707f32ce8103f47e2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 14 May 2024 15:36:34 +0200 Subject: [PATCH] gcc: same signess --- lib/format_text/export.c | 2 +- lib/mm/memlock.c | 2 +- lib/report/report.c | 2 +- libdm/dm-tools/dmsetup.c | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/format_text/export.c b/lib/format_text/export.c index daf7dec1b..f417bcbdc 100644 --- a/lib/format_text/export.c +++ b/lib/format_text/export.c @@ -233,7 +233,7 @@ static int _sectors_to_units(uint64_t sectors, char *buffer, size_t s) "Exabytes", }; - int i; + unsigned i; double d = (double) sectors; /* to convert to K */ diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c index a73da59bc..41f582e22 100644 --- a/lib/mm/memlock.c +++ b/lib/mm/memlock.c @@ -364,7 +364,7 @@ static int _memlock_maps(struct cmd_context *cmd, lvmlock_t lock, size_t *mstats for (len = 0 ; len < _maps_len; len += n) { if (!(n = read(_maps_fd, _maps_buffer + len, _maps_len - len))) break; /* EOF */ - if ((n < 0) || (len >= (SSIZE_MAX - n))) { + if ((n < 0) || (len >= (size_t)(SSIZE_MAX - n))) { log_sys_debug("read", _procselfmaps); return 0; } diff --git a/lib/report/report.c b/lib/report/report.c index e8572fd4e..23f16342a 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -583,7 +583,7 @@ static int _match_time_str(struct dm_list *ti_list, struct time_item *ti) { struct time_item *ti_context_p = (struct time_item *) dm_list_prev(ti_list, &ti->list); size_t reg_len; - int i; + unsigned i; ti->prop = TIME_PROP(TIME_NULL); diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c index 904bb91cb..cbb27c6e2 100644 --- a/libdm/dm-tools/dmsetup.c +++ b/libdm/dm-tools/dmsetup.c @@ -1661,7 +1661,7 @@ static int _udevflags(CMD_ARGS) { uint32_t cookie; uint16_t flags; - int i; + unsigned i; static const char _dm_flag_names[][32] = { "DISABLE_DM_RULES", "DISABLE_SUBSYSTEM_RULES", @@ -6318,7 +6318,7 @@ static void _devmap_name_usage(FILE *out) static void _stats_usage(FILE *out) { - int i; + unsigned i; fprintf(out, "Usage:\n\n" "%s\n\t" @@ -6342,7 +6342,7 @@ static void _stats_usage(FILE *out) static void _dmsetup_usage(FILE *out) { - int i; + unsigned i; fprintf(out, "Usage:\n\n" "%s\n\t" @@ -6453,7 +6453,7 @@ static int _dmsetup_help(CMD_ARGS) static const struct command *_find_command(const struct command *commands, size_t cmd_cnt, const char *name) { - int i; + unsigned i; if (name) for (i = 0; i < cmd_cnt; i++)