[U-Boot] [PATCH V2 05/10] fat: ff: add ifdef to avoid unused function warning
Stephen Warren
swarren at wwwdotorg.org
Tue Aug 11 16:55:40 CEST 2015
Without this, any board that doesn't enable read-write FAT triggers:
fs/fat/ff.c:1331:6: warning: ‘gen_numname’ defined but not used [-Wunused-function]
... since gen_numname() is not referenced from dir_register() is ifdef'd
out.
Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
---
v2: New patch.
---
fs/fat/ff.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/fat/ff.c b/fs/fat/ff.c
index fe7764d6daa2..c2527d50a506 100644
--- a/fs/fat/ff.c
+++ b/fs/fat/ff.c
@@ -1326,6 +1326,7 @@ void fit_lfn (
/*-----------------------------------------------------------------------*/
/* Create numbered name */
/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
#if _USE_LFN
static
void gen_numname (
@@ -1378,6 +1379,7 @@ void gen_numname (
} while (j < 8);
}
#endif
+#endif
--
1.9.1
More information about the U-Boot
mailing list