From f01a2c70fd375f04bfad4039a82165f901a89a87 Mon Sep 17 00:00:00 2001 From: guoshichao Date: Sat, 3 Aug 2024 11:52:55 +0800 Subject: [PATCH] greenhills: fix the enumerated type mixed using warning CC: obstack/lib_obstack_printf.c "mmap/fs_rammap.c", line 126: warning #188-D: enumerated type mixed with another type enum mm_map_type_e type = (uintptr_t)entry->priv.p & 3; ^ Signed-off-by: guoshichao --- fs/mmap/fs_rammap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/mmap/fs_rammap.c b/fs/mmap/fs_rammap.c index c011d2a943..d3594ef77c 100644 --- a/fs/mmap/fs_rammap.c +++ b/fs/mmap/fs_rammap.c @@ -125,7 +125,8 @@ static int unmap_rammap(FAR struct task_group_s *group, size_t length) { FAR struct file *filep = (FAR void *)((uintptr_t)entry->priv.p & ~3); - enum mm_map_type_e type = (uintptr_t)entry->priv.p & 3; + enum mm_map_type_e type = + (enum mm_map_type_e)((uintptr_t)entry->priv.p & 3); FAR void *newaddr = NULL; off_t offset; int ret = OK;