From 1c0b61ab78ad93e84d89f1f169bae19c6319bb76 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 25 Feb 2020 12:06:06 +0100 Subject: [PATCH] libblkid: fix compiler warning [-Wsign-compare] MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit libblkid/src/superblocks/exfat.c: In function ‘probe_exfat’: ./include/c.h:133:17: warning: comparison of distinct pointer types lacks a cast libblkid/src/superblocks/exfat.c:129:5: note: in expansion of macro ‘min’ ./include/c.h:134:8: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] Signed-off-by: Karel Zak --- libblkid/src/superblocks/exfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c index 62fb8ce0b8..41028270ba 100644 --- a/libblkid/src/superblocks/exfat.c +++ b/libblkid/src/superblocks/exfat.c @@ -126,7 +126,7 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag) label = find_label(pr, sb); if (label) blkid_probe_set_utf8label(pr, label->name, - min(label->length * 2, sizeof(label->name)), + min((size_t) label->length * 2, sizeof(label->name)), BLKID_ENC_UTF16LE); else if (errno) return -errno; -- 2.47.2