From: Karel Zak Date: Tue, 25 Feb 2020 11:06:06 +0000 (+0100) Subject: libblkid: fix compiler warning [-Wsign-compare] X-Git-Tag: v2.35.2~12 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1c0b61ab78ad93e84d89f1f169bae19c6319bb76;p=thirdparty%2Futil-linux.git libblkid: fix compiler warning [-Wsign-compare] 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 --- 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;