From c7cdfb06c96d4db0649a3565873fda8a10d11ac2 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 21 Sep 2021 16:30:43 +0200 Subject: add `__force` for marking casts across adress spaces --- src/kernel/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kernel/syscalls.c') diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 39cad3a..0ca7867 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -261,7 +261,7 @@ int _syscall_memflag(void __user *addr, size_t len, int flags) { struct pagedir *pages = process_current->pages; if (flags != MEMFLAG_PRESENT) panic_unimplemented(); // TODO - addr = (userptr_t)((int)addr & ~PAGE_MASK); // align to page boundary + addr = (userptr_t)((int __force)addr & ~PAGE_MASK); // align to page boundary for (; addr < goal; addr += PAGE_SIZE) { if (pagedir_virt2phys(pages, addr, false, false)) { // allocated page, currently a no-op -- cgit v1.2.3