From f7adb52c8bafd3a242af4c80e27b64c534553ae5 Mon Sep 17 00:00:00 2001 From: chenrun1 Date: Wed, 22 May 2024 21:05:11 +0800 Subject: [PATCH] hostfs_ioctl:Fixed the error:expected expression caused by not adding parentheses in switch hostfs/hostfs.c:612:17: error: expected expression FAR char *path = (FAR char *)(uintptr_t)arg; Signed-off-by: chenrun1 --- fs/hostfs/hostfs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c index d032155eb7512..2815ed80ee4fa 100644 --- a/fs/hostfs/hostfs.c +++ b/fs/hostfs/hostfs.c @@ -609,12 +609,14 @@ static int hostfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) switch (cmd) { case FIOC_FILEPATH: - FAR char *path = (FAR char *)(uintptr_t)arg; - ret = inode_getpath(filep->f_inode, path, PATH_MAX); - if (ret >= 0) - { - strlcat(path, hf->relpath, PATH_MAX); - } + { + FAR char *path = (FAR char *)(uintptr_t)arg; + ret = inode_getpath(filep->f_inode, path, PATH_MAX); + if (ret >= 0) + { + strlcat(path, hf->relpath, PATH_MAX); + } + } break; default: