From 7b28ac62974d41c2319a54389148c6de5e06bc5b Mon Sep 17 00:00:00 2001 From: Minsecrus <2972853299@qq.com> Date: Sun, 24 Nov 2024 14:58:30 +0800 Subject: [PATCH] =?UTF-8?q?int=E6=94=B9size=5Ft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sysapp/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysapp/shell.c b/src/sysapp/shell.c index 2ff99f2..8d55053 100644 --- a/src/sysapp/shell.c +++ b/src/sysapp/shell.c @@ -118,7 +118,7 @@ static void read(int argc,char** argv) { if(vfs_read(file,buf,0,file->size) == -1){ goto read_error; } - for (int i = 0; i < file->size; i++) { + for (size_t i = 0; i < file->size; i++) { printk("%c",buf[i]); } printk("\n"); @@ -149,7 +149,7 @@ static void ps(){ extern pcb_t *running_proc_head; // 找出最长进程名 pcb_t *longest_name = running_proc_head; - int longest_name_len = 0; + size_t longest_name_len = 0; while(longest_name != NULL){ if(strlen(longest_name->name) > longest_name_len) longest_name_len = strlen(longest_name->name);