mm/map/vm_region.c: Fix usage of void* arithmetics

Fixes build error:
map/vm_region.c: In function 'vm_map_region':
map/vm_region.c:128:16: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]
  128 |   return vaddr + (MM_PGMASK & paddr);
      |                ^
cc1: all warnings being treated as errors
This commit is contained in:
Ville Juven 2024-08-15 14:44:53 +03:00 committed by Alan Carvalho de Assis
parent 9c2af7284b
commit 971ca501b9
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ FAR void *vm_map_region(uintptr_t paddr, size_t size)
}
}
return vaddr + (MM_PGMASK & paddr);
return (FAR void *)((uintptr_t)vaddr + (MM_PGMASK & paddr));
error:
if (i) /* undo alway mapped pages */