Merge pull request #1509 from haukepetersen/fix_cortexmcommon_cppcheck
cpu/cortex-mX_common: fixed type issues in thread_arch
This commit is contained in:
commit
19ab93cadc
@ -67,7 +67,7 @@ char *thread_arch_stack_init(void *(*task_func)(void *),
|
|||||||
int stack_size)
|
int stack_size)
|
||||||
{
|
{
|
||||||
uint32_t *stk;
|
uint32_t *stk;
|
||||||
stk = (uint32_t *)(stack_start + stack_size);
|
stk = (uint32_t *)((uint32_t *)stack_start + stack_size);
|
||||||
|
|
||||||
/* marker */
|
/* marker */
|
||||||
stk--;
|
stk--;
|
||||||
|
|||||||
@ -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)
|
char *thread_arch_stack_init(void *(*task_func)(void *), void *arg, void *stack_start, int stack_size)
|
||||||
{
|
{
|
||||||
uint32_t *stk;
|
uint32_t *stk;
|
||||||
stk = (uint32_t *)(stack_start + stack_size);
|
stk = (uint32_t *)((uint32_t *)stack_start + stack_size);
|
||||||
|
|
||||||
/* marker */
|
/* marker */
|
||||||
stk--;
|
stk--;
|
||||||
@ -116,7 +116,7 @@ void thread_arch_stack_print(void)
|
|||||||
count++;
|
count++;
|
||||||
} while (*sp != STACK_MARKER);
|
} 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)
|
__attribute__((naked)) void thread_arch_start_threading(void)
|
||||||
|
|||||||
@ -63,7 +63,7 @@ char *thread_arch_stack_init(void *(*task_func)(void *),
|
|||||||
int stack_size)
|
int stack_size)
|
||||||
{
|
{
|
||||||
uint32_t *stk;
|
uint32_t *stk;
|
||||||
stk = (uint32_t *)(stack_start + stack_size);
|
stk = (uint32_t *)((uint32_t*)stack_start + stack_size);
|
||||||
|
|
||||||
/* marker */
|
/* marker */
|
||||||
stk--;
|
stk--;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user