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
The following commit(s) were added to refs/heads/master by this push:
new 0702dc5361 fs/vfs: Fix initialization of `g_pseudofile_ops`
0702dc5361 is described below
commit 0702dc536172b73e05a45fe7539ff3df4943ff6d
Author: wangjianyu3 <[email protected]>
AuthorDate: Fri Nov 8 20:12:18 2024 +0800
fs/vfs: Fix initialization of `g_pseudofile_ops`
Config: sim:nsh
Log
CC: driver/fs_registerblockdriver.c vfs/fs_pseudofile.c:99:3: warning:
initialization of ‘ssize_t (*)(struct file *, const struct uio *)’ {aka ‘long
int (*)(struct file *, const struct uio *)’} from incompatible pointer type
‘int (*)(struct inode *)’ [-Wincompatible-pointer-types]
99 | pseudofile_unlink, /* unlink */
| ^~~~~~~~~~~~~~~~~
vfs/fs_pseudofile.c:99:3: note: (near initialization for
‘g_pseudofile_ops.readv’)
Related: https://github.com/apache/nuttx/pull/13498
Signed-off-by: wangjianyu3 <[email protected]>
---
fs/vfs/fs_pseudofile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/vfs/fs_pseudofile.c b/fs/vfs/fs_pseudofile.c
index f6ca5c5fea..314c79eed8 100644
--- a/fs/vfs/fs_pseudofile.c
+++ b/fs/vfs/fs_pseudofile.c
@@ -95,6 +95,8 @@ static const struct file_operations g_pseudofile_ops =
pseudofile_mmap, /* mmap */
pseudofile_truncate, /* truncate */
NULL, /* poll */
+ NULL, /* readv */
+ NULL, /* writev */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
pseudofile_unlink, /* unlink */
#endif