From 744da992507bba41a2455e799277273b814f75de Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 12 Jul 2024 23:28:59 +0800 Subject: [PATCH] Fix vfs/fs_fstatfs.c:60:21: warning: variable 'inode' set but not used 60 | FAR struct inode *inode; | ^~~~~ Signed-off-by: Xiang Xiao --- fs/vfs/fs_fstatfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/vfs/fs_fstatfs.c b/fs/vfs/fs_fstatfs.c index ab972598d6..4ecec4df11 100644 --- a/fs/vfs/fs_fstatfs.c +++ b/fs/vfs/fs_fstatfs.c @@ -57,7 +57,9 @@ int fstatfs(int fd, FAR struct statfs *buf) { FAR struct file *filep; +#ifndef CONFIG_DISABLE_MOUNTPOINT FAR struct inode *inode; +#endif int ret; DEBUGASSERT(buf != NULL); @@ -72,11 +74,11 @@ int fstatfs(int fd, FAR struct statfs *buf) goto errout; } +#ifndef CONFIG_DISABLE_MOUNTPOINT /* Get the inode from the file structure */ inode = filep->f_inode; -#ifndef CONFIG_DISABLE_MOUNTPOINT /* The way we handle the stat depends on the type of inode that we * are dealing with. */