From b1cf714c50c4201bb67d9db0e4aa32e91ac453bc Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 17 Jul 2023 02:58:59 +0000 Subject: kernel/vm: Cast to uintptr_t before adding offset git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@21 a8a8aea2-181d-ee11-89e8-15fd0e089fc4 --- sys/include/vm/vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/include/vm/vm.h b/sys/include/vm/vm.h index 35775cc..e118beb 100644 --- a/sys/include/vm/vm.h +++ b/sys/include/vm/vm.h @@ -39,7 +39,7 @@ extern volatile struct limine_hhdm_request g_hhdm_request; #define VM_HIGHER_HALF (g_hhdm_request.response->offset) -#define PHYS_TO_VIRT(phys) (void *)(phys + VM_HIGHER_HALF) +#define PHYS_TO_VIRT(phys) (void *)((uintptr_t)phys + VM_HIGHER_HALF) #define VIRT_TO_PHYS(virt) ((uintptr_t)virt - VM_HIGHER_HALF) #endif /* !_SYS_VM_VM_H_ */ -- cgit v1.2.3