Merge pull request #1509 from haukepetersen/fix_cortexmcommon_cppcheck

cpu/cortex-mX_common: fixed type issues in thread_arch
This commit is contained in:
Hauke Petersen 2014-07-31 23:04:42 +02:00
commit 19ab93cadc
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) 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--;

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) 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)

View File

@ -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--;