diff --git a/cpu/arm_common/arm_cpu.c b/cpu/arm_common/arm_cpu.c index 032b42020d..0bf51b02ca 100644 --- a/cpu/arm_common/arm_cpu.c +++ b/cpu/arm_common/arm_cpu.c @@ -37,7 +37,7 @@ char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_si { unsigned int *stk; int i; - stk = (unsigned int *)(stack_start + stack_size); + stk = (unsigned int *)((unsigned int)stack_start + stack_size); stk--; *stk = STACK_MARKER; @@ -48,7 +48,7 @@ char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_si /* set the stack pointer (SP) */ stk--; - *stk = (unsigned int)(stack_start + stack_size) - 4; + *stk = (unsigned int)((unsigned int)stack_start + stack_size) - 4; /* build base stack */ for (i = REGISTER_CNT; i >= 0 ; i--) { diff --git a/cpu/lpc2387/mci/lpc2387-mci.c b/cpu/lpc2387/mci/lpc2387-mci.c index 869e7081fc..b04aa3c341 100644 --- a/cpu/lpc2387/mci/lpc2387-mci.c +++ b/cpu/lpc2387/mci/lpc2387-mci.c @@ -879,7 +879,7 @@ DRESULT MCI_ioctl( ) { DRESULT res; - unsigned char b, *ptr = buff; + unsigned char b, *ptr = (unsigned char *)buff; unsigned long resp[4], d, *dp, st, ed; @@ -937,7 +937,7 @@ DRESULT MCI_ioctl( break; /* Check if sector erase can be applied to the card */ } - dp = buff; + dp = (unsigned long *)buff; st = dp[0]; ed = dp[1]; @@ -1000,7 +1000,7 @@ DRESULT MCI_ioctl( while ((XferWp == 0) && !(XferStat & 0xC)); if (!(XferStat & 0xC)) { - Copy_al2un(buff, DmaBuff[0], 64); + Copy_al2un((unsigned char *)buff, DmaBuff[0], 64); res = RES_OK; } } diff --git a/cpu/native/native_cpu.c b/cpu/native/native_cpu.c index e0dcaf8a66..7ac72aa5fa 100644 --- a/cpu/native/native_cpu.c +++ b/cpu/native/native_cpu.c @@ -78,7 +78,7 @@ char *thread_stack_init(void (*task_func)(void), void *stack_start, int stacksiz DEBUG("thread_stack_init()\n"); - stk = stack_start; + stk = (unsigned int *)stack_start; #ifdef NATIVESPONTOP p = (ucontext_t *)stk;