@@ -109,7 +109,9 @@ static void mbed_lwip_socket_callback(struct netconn *nc, enum netconn_evt eh, u
109
109
110
110
/* TCP/IP and Network Interface Initialisation */
111
111
static struct netif lwip_netif ;
112
+ #if LWIP_IPV4
112
113
static bool lwip_dhcp = false;
114
+ #endif
113
115
static char lwip_mac_address [NSAPI_MAC_SIZE ];
114
116
115
117
#if !LWIP_IPV4 || !LWIP_IPV6
@@ -190,7 +192,9 @@ static bool convert_lwip_addr_to_mbed(nsapi_addr_t *out, const ip_addr_t *in)
190
192
return true;
191
193
}
192
194
#endif
195
+ #if LWIP_IPV6 && LWIP_IPV4
193
196
return false;
197
+ #endif
194
198
}
195
199
196
200
static const ip_addr_t * mbed_lwip_get_ipv4_addr (const struct netif * netif )
@@ -325,13 +329,13 @@ static void mbed_lwip_netif_status_irq(struct netif *lwip_netif)
325
329
static void mbed_lwip_set_mac_address (void )
326
330
{
327
331
#if (MBED_MAC_ADDRESS_SUM != MBED_MAC_ADDR_INTERFACE )
328
- snprintf (lwip_mac_address , NSAPI_MAC_SIZE , "%02x:%02x:%02x:%02x:%02x:%02x" ,
332
+ ( void ) snprintf (lwip_mac_address , NSAPI_MAC_SIZE , "%02x:%02x:%02x:%02x:%02x:%02x" ,
329
333
MBED_MAC_ADDR_0 , MBED_MAC_ADDR_1 , MBED_MAC_ADDR_2 ,
330
334
MBED_MAC_ADDR_3 , MBED_MAC_ADDR_4 , MBED_MAC_ADDR_5 );
331
335
#else
332
336
char mac [6 ];
333
337
mbed_mac_address (mac );
334
- snprintf (lwip_mac_address , NSAPI_MAC_SIZE , "%02x:%02x:%02x:%02x:%02x:%02x" ,
338
+ ( void ) snprintf (lwip_mac_address , NSAPI_MAC_SIZE , "%02x:%02x:%02x:%02x:%02x:%02x" ,
335
339
mac [0 ], mac [1 ], mac [2 ], mac [3 ], mac [4 ], mac [5 ]);
336
340
#endif
337
341
@@ -366,7 +370,9 @@ char *mbed_lwip_get_ip_address(char *buf, nsapi_size_t buflen)
366
370
return ip4addr_ntoa_r (ip_2_ip4 (addr ), buf , buflen );
367
371
}
368
372
#endif
373
+ #if LWIP_IPV6 && LWIP_IPV4
369
374
return NULL ;
375
+ #endif
370
376
}
371
377
372
378
const char * mbed_lwip_get_netmask (char * buf , nsapi_size_t buflen )
@@ -676,7 +682,7 @@ static nsapi_error_t mbed_lwip_socket_open(nsapi_stack_t *stack, nsapi_socket_t
676
682
return NSAPI_ERROR_NO_SOCKET ;
677
683
}
678
684
679
- u8_t lwip_proto = proto == NSAPI_TCP ? NETCONN_TCP : NETCONN_UDP ;
685
+ enum netconn_type lwip_proto = proto == NSAPI_TCP ? NETCONN_TCP : NETCONN_UDP ;
680
686
681
687
#if LWIP_IPV6 && LWIP_IPV4
682
688
const ip_addr_t * ip_addr ;
0 commit comments