From f8d33e40ac04d42481f00ef2424b97c68123fa8a Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 18 Jan 2023 11:17:42 +0800 Subject: [PATCH] Fix mmap/fs_mmap.c:259:13: warning: 'mapped' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Xiang Xiao --- fs/mmap/fs_mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/mmap/fs_mmap.c b/fs/mmap/fs_mmap.c index 9f08cc2d32..e1e2fe440b 100644 --- a/fs/mmap/fs_mmap.c +++ b/fs/mmap/fs_mmap.c @@ -256,7 +256,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, int fd, off_t offset) { FAR struct file *filep = NULL; - FAR void *mapped; + FAR void *mapped = NULL; int ret; if (fd != -1 && fs_getfilep(fd, &filep) < 0)