mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-27 12:35:26 +00:00
fixed compiler warnings reported by mingw-64
This commit is contained in:
parent
39e32ea7c1
commit
4f9bcc5ecc
@ -118,11 +118,11 @@ lwip_gethostbyname(const char *name)
|
||||
#if DNS_DEBUG
|
||||
/* dump hostent */
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_name == %s\n", s_hostent.h_name));
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_aliases == %p\n", s_hostent.h_aliases));
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_aliases == %p\n", (void*)s_hostent.h_aliases));
|
||||
/* h_aliases are always empty */
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addrtype == %d\n", s_hostent.h_addrtype));
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_length == %d\n", s_hostent.h_length));
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list == %p\n", s_hostent.h_addr_list));
|
||||
LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list == %p\n", (void*)s_hostent.h_addr_list));
|
||||
if (s_hostent.h_addr_list != NULL) {
|
||||
u8_t idx;
|
||||
for (idx=0; s_hostent.h_addr_list[idx]; idx++) {
|
||||
|
@ -171,14 +171,14 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t*
|
||||
#if LWIP_SO_SNDRCVTIMEO_NONSTANDARD
|
||||
#define LWIP_SO_SNDRCVTIMEO_OPTTYPE int
|
||||
#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) (*(int *)(optval) = (val))
|
||||
#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((s32_t)*(int*)(optval))
|
||||
#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((s32_t)*(const int*)(optval))
|
||||
#else
|
||||
#define LWIP_SO_SNDRCVTIMEO_OPTTYPE struct timeval
|
||||
#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) do { \
|
||||
s32_t loc = (val); \
|
||||
((struct timeval *)(optval))->tv_sec = (loc) / 1000U; \
|
||||
((struct timeval *)(optval))->tv_usec = ((loc) % 1000U) * 1000U; }while(0)
|
||||
#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((struct timeval *)(optval))->tv_sec * 1000U) + (((struct timeval *)(optval))->tv_usec / 1000U))
|
||||
#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((const struct timeval *)(optval))->tv_sec * 1000U) + (((const struct timeval *)(optval))->tv_usec / 1000U))
|
||||
#endif
|
||||
|
||||
#define NUM_SOCKETS MEMP_NUM_NETCONN
|
||||
|
@ -524,7 +524,7 @@ dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_
|
||||
entry = entry->next;
|
||||
}
|
||||
#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < sizeof(local_hostlist_static) / sizeof(struct local_hostlist_entry); i++) {
|
||||
if ((LWIP_DNS_STRICMP(local_hostlist_static[i].name, hostname) == 0) &&
|
||||
LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, local_hostlist_static[i].addr)) {
|
||||
|
@ -772,6 +772,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p)
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
#if LWIP_HAVE_LOOPIF
|
||||
#if LWIP_IPV4
|
||||
static err_t
|
||||
netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr)
|
||||
@ -788,7 +789,8 @@ netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* ad
|
||||
LWIP_UNUSED_ARG(addr);
|
||||
return netif_loop_output(netif, p);
|
||||
}
|
||||
#endif
|
||||
#endif /* LWIP_IPV6 */
|
||||
#endif /* LWIP_HAVE_LOOPIF */
|
||||
|
||||
|
||||
/**
|
||||
|
@ -141,7 +141,7 @@ static const ip4_addr_t* ip_2_ip4_c(const ip_addr_t *ipaddr)
|
||||
ip4_addr_isany_val(*ip_2_ip4(&(ipaddr))))
|
||||
#define ip_addr_isbroadcast(ipaddr, netif) ((IP_IS_V6(ipaddr)) ? \
|
||||
0 : \
|
||||
ip4_addr_isbroadcast(ip_2_ip4(ipaddr), netif))
|
||||
ip4_addr_isbroadcast(ip_2_ip4_c(ipaddr), netif))
|
||||
#define ip_addr_ismulticast(ipaddr) ((IP_IS_V6(ipaddr)) ? \
|
||||
ip6_addr_ismulticast(ip_2_ip6_c(ipaddr)) : \
|
||||
ip4_addr_ismulticast(ip_2_ip4_c(ipaddr)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user