* [U-Boot] [PATCH] fs: fat: Fix warning in normalize_longname()
@ 2018-09-30 14:33 Tom Rini
2018-10-16 14:52 ` [U-Boot] " Alexander Graf
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2018-09-30 14:33 UTC (permalink / raw)
To: u-boot
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")
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
fs/fat/fat_write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index fc211e74bc69..98fe6b2b4ecc 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -1005,7 +1005,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 */
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] fs: fat: Fix warning in normalize_longname()
2018-09-30 14:33 [U-Boot] [PATCH] fs: fat: Fix warning in normalize_longname() Tom Rini
@ 2018-10-16 14:52 ` Alexander Graf
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2018-10-16 14:52 UTC (permalink / raw)
To: u-boot
> 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")
> Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Thanks, applied to efi-2018.11
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-16 14:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30 14:33 [U-Boot] [PATCH] fs: fat: Fix warning in normalize_longname() Tom Rini
2018-10-16 14:52 ` [U-Boot] " Alexander Graf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.