From: Tom Rini Date: Sun, 30 Sep 2018 14:33:42 +0000 (-0400) Subject: fs: fat: Fix warning in normalize_longname() X-Git-Tag: v2018.11-rc3~46^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=819c80f528f8529bb88d912efb141f5fd0ecef53;p=platform%2Fkernel%2Fu-boot.git fs: fat: Fix warning in normalize_longname() As observed with clang: fs/fat/fat_write.c:1024:13: warning: comparison of constant 128 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] if ((0x80 <= c) && (c <= 0xff)) ~~~~ ^ ~ fs/fat/fat_write.c:1024:25: warning: comparison of constant 255 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare] if ((0x80 <= c) && (c <= 0xff)) ~ ^ ~~~~ Fixes: 25bb9dab14f4 ("fs: fat: check and normalize file name") Signed-off-by: Tom Rini Signed-off-by: Alexander Graf --- diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 9fcf3bc..3272412 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -1012,7 +1012,7 @@ again: static int normalize_longname(char *l_filename, const char *filename) { const char *p, legal[] = "!#$%&\'()-.@^`_{}~"; - char c; + unsigned char c; int name_len; /* Check that the filename is valid */