1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

cpu/cortex-mX_common: fixed type issues

- added explicit cast for stack pointer
- fixed printf type inconsistency
This commit is contained in:
Hauke Petersen 2014-07-31 18:41:15 +02:00
parent 5e8517d956
commit 14e65fc48d
3 changed files with 4 additions and 4 deletions

View File

@ -67,7 +67,7 @@ char *thread_arch_stack_init(void *(*task_func)(void *),
int stack_size)
{
uint32_t *stk;
stk = (uint32_t *)(stack_start + stack_size);
stk = (uint32_t *)((uint32_t *)stack_start + stack_size);
/* marker */
stk--;

View File

@ -57,7 +57,7 @@ static void context_restore(void) NORETURN;
char *thread_arch_stack_init(void *(*task_func)(void *), void *arg, void *stack_start, int stack_size)
{
uint32_t *stk;
stk = (uint32_t *)(stack_start + stack_size);
stk = (uint32_t *)((uint32_t *)stack_start + stack_size);
/* marker */
stk--;
@ -116,7 +116,7 @@ void thread_arch_stack_print(void)
count++;
} while (*sp != STACK_MARKER);
printf("current stack size: %u byte\n", count);
printf("current stack size: %i byte\n", count);
}
__attribute__((naked)) void thread_arch_start_threading(void)

View File

@ -63,7 +63,7 @@ char *thread_arch_stack_init(void *(*task_func)(void *),
int stack_size)
{
uint32_t *stk;
stk = (uint32_t *)(stack_start + stack_size);
stk = (uint32_t *)((uint32_t*)stack_start + stack_size);
/* marker */
stk--;