mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
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 <wangjianyu3@xiaomi.com>
This commit is contained in:
@@ -95,6 +95,8 @@ static const struct file_operations g_pseudofile_ops =
|
|||||||
pseudofile_mmap, /* mmap */
|
pseudofile_mmap, /* mmap */
|
||||||
pseudofile_truncate, /* truncate */
|
pseudofile_truncate, /* truncate */
|
||||||
NULL, /* poll */
|
NULL, /* poll */
|
||||||
|
NULL, /* readv */
|
||||||
|
NULL, /* writev */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
pseudofile_unlink, /* unlink */
|
pseudofile_unlink, /* unlink */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user