Fix mmap/fs_mmap.c:259:13: warning: 'mapped' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-01-18 11:17:42 +08:00 committed by Alin Jerpelea
parent 1cf3147626
commit f8d33e40ac
1 changed files with 1 additions and 1 deletions

View File

@ -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)