diff --git a/src/kservice.c b/src/kservice.c index 5a59345b3e6..167f94a6a72 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -448,7 +448,7 @@ rt_weak rt_err_t rt_backtrace_formatted_print(rt_ubase_t *buffer, long buflen) { rt_kprintf("please use: addr2line -e rtthread.elf -a -f"); - for (size_t i = 0; i < buflen && buffer[i] != 0; i++) + for (rt_size_t i = 0; i < buflen && buffer[i] != 0; i++) { rt_kprintf(" 0x%lx", (rt_ubase_t)buffer[i]); } diff --git a/src/thread.c b/src/thread.c index d9816b52776..994e04d6f5e 100644 --- a/src/thread.c +++ b/src/thread.c @@ -829,7 +829,7 @@ rt_err_t rt_thread_control(rt_thread_t thread, int cmd, void *arg) { rt_uint8_t cpu; - cpu = (rt_uint8_t)(size_t)arg; + cpu = (rt_uint8_t)(rt_size_t)arg; return rt_sched_thread_bind_cpu(thread, cpu); }