mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Fix my last commits (unused variable warning)
my gcc at home did not show this warning...
This commit is contained in:
parent
3c1713406e
commit
7dd21e93c4
@ -551,9 +551,11 @@ netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr)
|
|||||||
void
|
void
|
||||||
netif_set_gw(struct netif *netif, const ip4_addr_t *gw)
|
netif_set_gw(struct netif *netif, const ip4_addr_t *gw)
|
||||||
{
|
{
|
||||||
|
#if LWIP_NETIF_EXT_STATUS_CALLBACK
|
||||||
ip_addr_t old_addr, new_addr;
|
ip_addr_t old_addr, new_addr;
|
||||||
ip_addr_copy_from_ip4(old_addr, *netif_ip4_gw(netif));
|
ip_addr_copy_from_ip4(old_addr, *netif_ip4_gw(netif));
|
||||||
ip_addr_copy_from_ip4(new_addr, *gw);
|
ip_addr_copy_from_ip4(new_addr, *gw);
|
||||||
|
#endif
|
||||||
|
|
||||||
ip4_addr_set(ip_2_ip4(&netif->gw), gw);
|
ip4_addr_set(ip_2_ip4(&netif->gw), gw);
|
||||||
IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4);
|
IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4);
|
||||||
@ -580,10 +582,12 @@ netif_set_gw(struct netif *netif, const ip4_addr_t *gw)
|
|||||||
void
|
void
|
||||||
netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask)
|
netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask)
|
||||||
{
|
{
|
||||||
|
#if LWIP_NETIF_EXT_STATUS_CALLBACK
|
||||||
ip_addr_t old_addr, new_addr;
|
ip_addr_t old_addr, new_addr;
|
||||||
ip_addr_copy_from_ip4(old_addr, *netif_ip4_netmask(netif));
|
ip_addr_copy_from_ip4(old_addr, *netif_ip4_netmask(netif));
|
||||||
ip_addr_copy_from_ip4(new_addr, *netmask);
|
ip_addr_copy_from_ip4(new_addr, *netmask);
|
||||||
|
#endif
|
||||||
|
|
||||||
mib2_remove_route_ip4(0, netif);
|
mib2_remove_route_ip4(0, netif);
|
||||||
/* set new netmask to netif */
|
/* set new netmask to netif */
|
||||||
ip4_addr_set(ip_2_ip4(&netif->netmask), netmask);
|
ip4_addr_set(ip_2_ip4(&netif->netmask), netmask);
|
||||||
|
Loading…
Reference in New Issue
Block a user