You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/17 04:02:00 UTC
(nuttx) 02/05: Fix vfs/fs_fstatfs.c:60:21: warning: variable 'inode' set but not used
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 744da992507bba41a2455e799277273b814f75de
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 12 23:28:59 2024 +0800
Fix vfs/fs_fstatfs.c:60:21: warning: variable 'inode' set but not used
60 | FAR struct inode *inode;
| ^~~~~
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
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.
*/