1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

remove pointer arithmetic on void*

=> this is illegal in C and only a GCC extension
This commit is contained in:
Stefan Lankes 2016-09-20 00:29:06 +02:00
parent 627db2da88
commit 052816dc06

View file

@ -42,7 +42,7 @@ void makecontext(ucontext_t *ucp, void (*func)(), int argc, ...)
//kprintf("sys_makecontext %p, func %p, stack 0x%zx, task %d\n", ucp, func, ucp->uc_stack.ss_sp, per_core(current_task)->id);
size_t* stack = (size_t*) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
size_t* stack = (size_t*) ((size_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
stack -= (argc > 6 ? argc - 6 : 0) + 1;
uint32_t idx = (argc > 6 ? argc - 6 : 0) + 1;