Fix some compilation warning (#5744)

* Fix some compilation warning

* 补充修正一些数据类型的使用错误

Co-authored-by: Meco Man <920369182@qq.com>
This commit is contained in:
dongly
2022-08-02 12:09:49 -04:00
committed by GitHub
co-authored by Meco Man
parent 7882e42c61
commit 3363586cbb
18 changed files with 113 additions and 65 deletions
+7 -7
View File
@@ -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
*
@@ -28,9 +28,9 @@
#include <rtdbg.h>
/* The list of network interface device */
struct netdev *netdev_list;
struct netdev *netdev_list = RT_NULL;
/* The default network interface device */
struct netdev *netdev_default;
struct netdev *netdev_default = RT_NULL;
/**
* This function will register network interface device and
@@ -46,8 +46,8 @@ struct netdev *netdev_default;
int netdev_register(struct netdev *netdev, const char *name, void *user_data)
{
rt_base_t level;
uint16_t flags_mask;
int index;
rt_uint16_t flags_mask;
rt_uint16_t index;
RT_ASSERT(netdev);
RT_ASSERT(name);
@@ -706,7 +706,7 @@ void netdev_low_level_set_gw(struct netdev *netdev, const ip_addr_t *gw)
*/
void netdev_low_level_set_dns_server(struct netdev *netdev, uint8_t dns_num, const ip_addr_t *dns_server)
{
int index;
unsigned int index;
RT_ASSERT(dns_server);
@@ -1173,7 +1173,7 @@ MSH_CMD_EXPORT_ALIAS(netdev_ping, ping, ping network host);
static void netdev_list_dns(void)
{
int index = 0;
unsigned int index = 0;
struct netdev *netdev = RT_NULL;
rt_slist_t *node = RT_NULL;