From 7fb9a0a3bb6f604ffac86c220bdb475f1b3e0ac2 Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Tue, 17 Dec 2024 23:13:39 +0800 Subject: [PATCH] [kernel] change size_t to rt_size_t --- src/kservice.c | 2 +- src/thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }