-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix some compilation warning #5744
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
Conversation
@@ -279,10 +279,10 @@ static void stm32_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode) | |||
|
|||
rt_inline rt_int32_t bit2bitno(rt_uint32_t bit) | |||
{ | |||
rt_uint8_t i; | |||
rt_int32_t i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i的取值范围只有 0 ~ 32 有必要 32 位吗?
格式化规范的问题已经解决,我自己定义的clang-format,不小心用在这了 |
08f46a7
to
ddb5eb3
Compare
https://github.com/mysterywolf/formatting 用这个格式化 这个是专门设计给rtt格式化用的 |
已修改,尽量只改符号,或尽量小的类型 |
已更新 |
e5302bb
to
2976c2e
Compare
麻烦再 解决一下冲突 我们再review一下 |
0659759
to
14c3075
Compare
已更新 |
冲突已经再次解决,请review @mysterywolf |
请ping我的邮箱 [email protected] 我拉你进群 |
这份PR开会时再讨论一下细节,期望在4.1.1发布之前合进去 @Guozhanxin |
@dongly 请再耐心等待一下,冲突的问题目前先不需要解决。 |
@dongly 如果有新的修改请不要强制推送,我帮你改了一部分,如果一旦强制推送,我修改的部分就没了 |
rt_err_t result; | ||
|
||
for (int i = 0; i < obj_num; i++) | ||
for (rt_size_t i = 0; i < sizeof(i2c_obj) / sizeof(struct stm32_i2c); i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为啥要合并起来呀,感觉可读性还不如之前
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
节省一个内部变量
{ | ||
0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x21, 0x0d, 0x0a, | ||
}; | ||
|
||
const static struct romfs_dirent _dummy[] = | ||
static const struct romfs_dirent _dummy[] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分代码是脚本自动生成的,如果要修改,后面最好把tool目录下的脚本也修改了。要不然下次生成又被还原了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这就是下一个pr了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块应该是要改一下脚本吧 脚本生成的有问题 确实应该是static关键字在前 const在后
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确认了 脚本没啥问题
拉取/合并请求描述:(PR description)
[
修复 gcc 带参数 " -W" 编译出现的一些警告
]
以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in the submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use a web browser to visit PR, and check items one by one, and ticked them if no problem.
当前拉取/合并请求的状态 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