Merge pull request #649 from BytesGalore/fix_missing_typecasts

Fix added missing typecasts to stack (arm/msba2) and send/receive buffer (native)
This commit is contained in:
Oleg Hahm 2014-02-07 12:25:08 +01:00
commit 62046d6ea0
3 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_si
{ {
unsigned int *stk; unsigned int *stk;
int i; int i;
stk = (unsigned int *)(stack_start + stack_size); stk = (unsigned int *)((unsigned int)stack_start + stack_size);
stk--; stk--;
*stk = STACK_MARKER; *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) */ /* set the stack pointer (SP) */
stk--; stk--;
*stk = (unsigned int)(stack_start + stack_size) - 4; *stk = (unsigned int)((unsigned int)stack_start + stack_size) - 4;
/* build base stack */ /* build base stack */
for (i = REGISTER_CNT; i >= 0 ; i--) { for (i = REGISTER_CNT; i >= 0 ; i--) {

View File

@ -879,7 +879,7 @@ DRESULT MCI_ioctl(
) )
{ {
DRESULT res; DRESULT res;
unsigned char b, *ptr = buff; unsigned char b, *ptr = (unsigned char *)buff;
unsigned long resp[4], d, *dp, st, ed; 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 */ break; /* Check if sector erase can be applied to the card */
} }
dp = buff; dp = (unsigned long *)buff;
st = dp[0]; st = dp[0];
ed = dp[1]; ed = dp[1];
@ -1000,7 +1000,7 @@ DRESULT MCI_ioctl(
while ((XferWp == 0) && !(XferStat & 0xC)); while ((XferWp == 0) && !(XferStat & 0xC));
if (!(XferStat & 0xC)) { if (!(XferStat & 0xC)) {
Copy_al2un(buff, DmaBuff[0], 64); Copy_al2un((unsigned char *)buff, DmaBuff[0], 64);
res = RES_OK; res = RES_OK;
} }
} }

View File

@ -78,7 +78,7 @@ char *thread_stack_init(void (*task_func)(void), void *stack_start, int stacksiz
DEBUG("thread_stack_init()\n"); DEBUG("thread_stack_init()\n");
stk = stack_start; stk = (unsigned int *)stack_start;
#ifdef NATIVESPONTOP #ifdef NATIVESPONTOP
p = (ucontext_t *)stk; p = (ucontext_t *)stk;