From 757552e7597788b3aefa2cd57c6efe3d8a550b43 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 30 Oct 2022 00:56:32 +0800 Subject: [PATCH] Fix nsh_fscmds.c:92:19: error: unused function 'ls_specialdir' [-Werror,-Wunused-function] Signed-off-by: Xiang Xiao --- nshlib/nsh_fscmds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index ec800e0f9..4f161a37b 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -89,12 +89,14 @@ * Name: ls_specialdir ****************************************************************************/ +#if !defined(CONFIG_NSH_DISABLE_LS) static inline int ls_specialdir(FAR const char *dir) { /* '.' and '..' directories are not listed like normal directories */ return (strcmp(dir, ".") == 0 || strcmp(dir, "..") == 0); } +#endif /**************************************************************************** * Name: ls_handler