Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mozi
rt-thread
提交
73832699
R
rt-thread
项目概览
Mozi
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
73832699
编写于
2月 12, 2019
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Kernel] Code cleanup for compiling warning.
上级
f1826266
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
8 deletion
+8
-8
components/dfs/src/dfs.c
components/dfs/src/dfs.c
+5
-5
components/drivers/serial/serial.c
components/drivers/serial/serial.c
+1
-1
src/kservice.c
src/kservice.c
+1
-1
src/mem.c
src/mem.c
+1
-1
未找到文件。
components/dfs/src/dfs.c
浏览文件 @
73832699
...
...
@@ -123,7 +123,7 @@ static int fd_alloc(struct dfs_fdtable *fdt, int startfd)
int
idx
;
/* find an empty fd entry */
for
(
idx
=
startfd
;
idx
<
fdt
->
maxfd
;
idx
++
)
for
(
idx
=
startfd
;
idx
<
(
int
)
fdt
->
maxfd
;
idx
++
)
{
if
(
fdt
->
fds
[
idx
]
==
RT_NULL
)
break
;
...
...
@@ -155,7 +155,7 @@ static int fd_alloc(struct dfs_fdtable *fdt, int startfd)
}
/* allocate 'struct dfs_fd' */
if
(
idx
<
fdt
->
maxfd
&&
fdt
->
fds
[
idx
]
==
RT_NULL
)
if
(
idx
<
(
int
)
fdt
->
maxfd
&&
fdt
->
fds
[
idx
]
==
RT_NULL
)
{
fdt
->
fds
[
idx
]
=
rt_calloc
(
1
,
sizeof
(
struct
dfs_fd
));
if
(
fdt
->
fds
[
idx
]
==
RT_NULL
)
...
...
@@ -223,7 +223,7 @@ struct dfs_fd *fd_get(int fd)
fdt
=
dfs_fdtable_get
();
fd
=
fd
-
DFS_FD_OFFSET
;
if
(
fd
<
0
||
fd
>=
fdt
->
maxfd
)
if
(
fd
<
0
||
fd
>=
(
int
)
fdt
->
maxfd
)
return
NULL
;
dfs_lock
();
...
...
@@ -263,7 +263,7 @@ void fd_put(struct dfs_fd *fd)
struct
dfs_fdtable
*
fdt
;
fdt
=
dfs_fdtable_get
();
for
(
index
=
0
;
index
<
fdt
->
maxfd
;
index
++
)
for
(
index
=
0
;
index
<
(
int
)
fdt
->
maxfd
;
index
++
)
{
if
(
fdt
->
fds
[
index
]
==
fd
)
{
...
...
@@ -531,7 +531,7 @@ int list_fd(void)
rt_kprintf
(
"fd type ref magic path
\n
"
);
rt_kprintf
(
"-- ------ --- ----- ------
\n
"
);
for
(
index
=
0
;
index
<
fd_table
->
maxfd
;
index
++
)
for
(
index
=
0
;
index
<
(
int
)
fd_table
->
maxfd
;
index
++
)
{
struct
dfs_fd
*
fd
=
fd_table
->
fds
[
index
];
...
...
components/drivers/serial/serial.c
浏览文件 @
73832699
...
...
@@ -478,7 +478,7 @@ rt_inline int _serial_dma_rx(struct rt_serial_device *serial, rt_uint8_t *data,
RT_ASSERT
(
rx_fifo
!=
RT_NULL
);
if
(
length
<
fifo_recved_len
)
if
(
length
<
(
int
)
fifo_recved_len
)
recv_len
=
length
;
else
recv_len
=
fifo_recved_len
;
...
...
src/kservice.c
浏览文件 @
73832699
...
...
@@ -476,7 +476,7 @@ rt_size_t rt_strnlen(const char *s, rt_ubase_t maxlen)
{
const
char
*
sc
;
for
(
sc
=
s
;
*
sc
!=
'\0'
&&
sc
-
s
<
maxlen
;
++
sc
)
/* nothing */
for
(
sc
=
s
;
*
sc
!=
'\0'
&&
sc
-
s
<
(
int
)
maxlen
;
++
sc
)
/* nothing */
;
return
sc
-
s
;
...
...
src/mem.c
浏览文件 @
73832699
...
...
@@ -644,7 +644,7 @@ int memcheck(void)
{
position
=
(
rt_ubase_t
)
mem
-
(
rt_ubase_t
)
heap_ptr
;
if
(
position
<
0
)
goto
__exit
;
if
(
position
>
mem_size_aligned
)
goto
__exit
;
if
(
position
>
(
int
)
mem_size_aligned
)
goto
__exit
;
if
(
mem
->
magic
!=
HEAP_MAGIC
)
goto
__exit
;
if
(
mem
->
used
!=
0
&&
mem
->
used
!=
1
)
goto
__exit
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录