diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-10-08 15:41:28 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-10-08 23:29:49 +0900 |
commit | 9a90cd228466ec088d6f0da8d1aa065f03daa7c8 (patch) | |
tree | b4fc458cdfbdad102551c421e7469e560e2b9030 /coroutine/riscv64 | |
parent | d8b64eac55cf6c4b228b0969cd3abb0a6274de16 (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/riscv64')
-rw-r--r-- | coroutine/riscv64/Context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coroutine/riscv64/Context.h b/coroutine/riscv64/Context.h index 9ce1140e0b..3660fb5577 100644 --- a/coroutine/riscv64/Context.h +++ b/coroutine/riscv64/Context.h @@ -36,7 +36,7 @@ static inline void coroutine_initialize( context->stack_pointer -= COROUTINE_REGISTERS; memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS); - context->stack_pointer[0xc0 / 8] = (void*)start; + context->stack_pointer[0xc0 / 8] = (void*)(uintptr_t)start; } struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target); |