From 08737c2a2612b7304e4c36afd7bddf1909fec8a6 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Tue, 17 May 2022 02:19:53 -0400 Subject: [simulator] 消除windows下的警告 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/finsh/shell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 1fc2bf7bcd..c06b688ed3 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -529,7 +529,7 @@ void finsh_thread_entry(void *parameter) /* copy the history command */ rt_memcpy(shell->line, &shell->cmd_history[shell->current_history][0], FINSH_CMD_SIZE); - shell->line_curpos = shell->line_position = strlen(shell->line); + shell->line_curpos = shell->line_position = (rt_uint16_t)strlen(shell->line); shell_handle_history(shell); #endif continue; @@ -551,7 +551,7 @@ void finsh_thread_entry(void *parameter) rt_memcpy(shell->line, &shell->cmd_history[shell->current_history][0], FINSH_CMD_SIZE); - shell->line_curpos = shell->line_position = strlen(shell->line); + shell->line_curpos = shell->line_position = (rt_uint16_t)strlen(shell->line); shell_handle_history(shell); #endif continue; @@ -591,7 +591,7 @@ void finsh_thread_entry(void *parameter) /* auto complete */ shell_auto_complete(&shell->line[0]); /* re-calculate position */ - shell->line_curpos = shell->line_position = strlen(shell->line); + shell->line_curpos = shell->line_position = (rt_uint16_t)strlen(shell->line); continue; } -- cgit v1.3.1