-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Fix] <components>:finsh/shell.c F: char rt_hw_console_getchar(void) #10345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
或者这部分应该调整成 |
我觉得可以解决问题 我这两天 改完测一下吧 |
signed char同样可以 @BernardXiong |
感觉也不用,可以试着提个pr看下效果 |
ok 那我这个pr先留着? |
如果是 |
When using char rt_hw_console_getchar(void), some compilers may default to returning 255 instead of the expected -1, causing the condition if(ch < 0) at F: shell.c L:519 to fail and enter an erroneous loop. Solution: Use the signed char type return value as rt_hw_console_getchar Signed-off-by: Yucai Liu <[email protected]>
f7d1195
to
2af2fae
Compare
好的 我已改成signed char作为 rt_hw_console_getchar的返回值 |
When using char rt_hw_console_getchar(void),
some compilers may default to returning 255 instead of the expected -1, causing the condition if(ch < 0) at F: shell.c L:519 to fail and enter an erroneous loop.
Solution: Use the same int type return value as finsh_getchar
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up