diff --git a/fs/mmap/fs_rammap.c b/fs/mmap/fs_rammap.c index 16ea937659..222f9f40c6 100644 --- a/fs/mmap/fs_rammap.c +++ b/fs/mmap/fs_rammap.c @@ -62,7 +62,7 @@ static int unmap_rammap(FAR struct task_group_s *group, * simulate the unmapping. */ - offset = start - entry->vaddr; + offset = (uintptr_t)start - (uintptr_t)entry->vaddr; if (offset + length < entry->length) { ferr("ERROR: Cannot umap without unmapping to the end\n");