diff mbox

[U-Boot,V3,04/10] fat: ff: add ifdef to avoid unused function warning

Message ID 1443765973-5897-4-git-send-email-swarren@wwwdotorg.org
State Deferred
Delegated to: Tom Rini
Headers show

Commit Message

Stephen Warren Oct. 2, 2015, 6:06 a.m. UTC
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@wwwdotorg.org>
---
v2: New patch.
---
 fs/fat/ff.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/fs/fat/ff.c b/fs/fat/ff.c
index 345c174155d1..478daa7d6b0b 100644
--- a/fs/fat/ff.c
+++ b/fs/fat/ff.c
@@ -1374,6 +1374,7 @@  void fit_lfn (
 /*-----------------------------------------------------------------------*/
 /* Create numbered name                                                  */
 /*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
 #if _USE_LFN
 static
 void gen_numname (
@@ -1426,6 +1427,7 @@  void gen_numname (
 	} while (j < 8);
 }
 #endif
+#endif