summaryrefslogtreecommitdiff
path: root/components/net
diff options
context:
space:
mode:
authorTangyuxin <[email protected]>2022-09-20 22:31:11 +0800
committerGitHub <[email protected]>2022-09-20 10:31:11 -0400
commita4829b1c004015cca489679cc335b6089aa9da31 (patch)
tree3e346e76bb1c77b5b189ca28b053daeaea5154e9 /components/net
parent746d7a01bdb29c692b696780f938f11253ae1103 (diff)
[fix] Fix simulator compilation warnings (#6438)
* [fix] Fix simulator compilation warnings * Update bsp/simulator/rtconfig_project.h Co-authored-by: Man, Jianting (Meco) <[email protected]>
Diffstat (limited to 'components/net')
-rw-r--r--components/net/lwip/port/ethernetif.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/net/lwip/port/ethernetif.c b/components/net/lwip/port/ethernetif.c
index 55ea81a867..9b6dd7c896 100644
--- a/components/net/lwip/port/ethernetif.c
+++ b/components/net/lwip/port/ethernetif.c
@@ -475,6 +475,10 @@ static err_t eth_netif_device_init(struct netif *netif)
/* get device object */
device = (rt_device_t) ethif;
+ if (rt_device_init(device) != RT_EOK)
+ {
+ return ERR_IF;
+ }
if (rt_device_open(device, RT_DEVICE_FLAG_RDWR) != RT_EOK)
{
return ERR_IF;
@@ -910,7 +914,7 @@ FINSH_FUNCTION_EXPORT(set_dns, set DNS server address);
void list_if(void)
{
- rt_ubase_t index;
+ rt_uint8_t index;
struct netif * netif;
rt_enter_critical();