mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-25 22:34:19 +08:00
Fix some compilation warning (#5744)
* Fix some compilation warning * 补充修正一些数据类型的使用错误 Co-authored-by: Meco Man <920369182@qq.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -200,7 +200,7 @@ static int serial_fops_poll(struct dfs_fd *fd, struct rt_pollreq *req)
|
||||
return mask;
|
||||
}
|
||||
|
||||
const static struct dfs_file_ops _serial_fops =
|
||||
static const struct dfs_file_ops _serial_fops =
|
||||
{
|
||||
serial_fops_open,
|
||||
serial_fops_close,
|
||||
@@ -900,7 +900,7 @@ struct speed_baudrate_item
|
||||
int baudrate;
|
||||
};
|
||||
|
||||
const static struct speed_baudrate_item _tbl[] =
|
||||
static const struct speed_baudrate_item _tbl[] =
|
||||
{
|
||||
{B2400, BAUD_RATE_2400},
|
||||
{B4800, BAUD_RATE_4800},
|
||||
@@ -918,7 +918,7 @@ const static struct speed_baudrate_item _tbl[] =
|
||||
|
||||
static speed_t _get_speed(int baudrate)
|
||||
{
|
||||
int index;
|
||||
size_t index;
|
||||
|
||||
for (index = 0; index < sizeof(_tbl)/sizeof(_tbl[0]); index ++)
|
||||
{
|
||||
@@ -931,7 +931,7 @@ static speed_t _get_speed(int baudrate)
|
||||
|
||||
static int _get_baudrate(speed_t speed)
|
||||
{
|
||||
int index;
|
||||
size_t index;
|
||||
|
||||
for (index = 0; index < sizeof(_tbl)/sizeof(_tbl[0]); index ++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user