From 6cd59ad0124d8a22e8cbb77f87e8f0aa20633c59 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 21 Jul 2022 15:25:33 +0200 Subject: fix type-related compiler warnings --- src/kernel/arch/amd64/pagedir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kernel/arch/amd64/pagedir.c') diff --git a/src/kernel/arch/amd64/pagedir.c b/src/kernel/arch/amd64/pagedir.c index f4fbc09..75c9746 100644 --- a/src/kernel/arch/amd64/pagedir.c +++ b/src/kernel/arch/amd64/pagedir.c @@ -23,7 +23,7 @@ static bool addr_canonical(const __user void *addr) { /* the types here are idiotic because C is idiotic */ static __user void *addr_canonize(const __user void *addr) { - union virt_addr v = {.full = (void __force*)addr}; + union virt_addr v = {.full = (void __user*)addr}; v.sign = (((uintptr_t)addr >> 47) & 1) * 0xFFFF; assert(addr_canonical(addr)); return v.full; -- cgit v1.2.3