summaryrefslogtreecommitdiff
path: root/coroutine/x86
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-08 15:41:28 +0900
committerNobuyoshi Nakada <[email protected]>2024-10-08 23:29:49 +0900
commit9a90cd228466ec088d6f0da8d1aa065f03daa7c8 (patch)
treeb4fc458cdfbdad102551c421e7469e560e2b9030 /coroutine/x86
parentd8b64eac55cf6c4b228b0969cd3abb0a6274de16 (diff)
Cast via `uintptr_t` function pointer between object pointer
- ISO C forbids conversion of function pointer to object pointer type - ISO C forbids conversion of object pointer to function pointer type
Diffstat (limited to 'coroutine/x86')
-rw-r--r--coroutine/x86/Context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/coroutine/x86/Context.h b/coroutine/x86/Context.h
index d98eaf6486..f33b338eab 100644
--- a/coroutine/x86/Context.h
+++ b/coroutine/x86/Context.h
@@ -45,7 +45,7 @@ static inline void coroutine_initialize(
context->stack_pointer = (void**)((uintptr_t)top & ~0xF);
*--context->stack_pointer = NULL;
- *--context->stack_pointer = (void*)start;
+ *--context->stack_pointer = (void*)(uintptr_t)start;
context->stack_pointer -= COROUTINE_REGISTERS;
memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS);