mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +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
|
||||
*
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user