[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-commits] [SCM] lwIP - A Lightweight TCPIP stack branch, master
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-commits] [SCM] lwIP - A Lightweight TCPIP stack branch, master, updated. 318ba1decdc6ab35d52bef8f07808995ce4933a9 |
Date: |
Sun, 6 Sep 2015 11:31:35 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello Simon,
On Sun, Sep 06, 2015 at 09:27:57AM +0000, Sylvain Rochet wrote:
>
> dns: fixed trivial compiler warning
>
> lwip/src/core/dns.c:1471:8: warning: extra tokens at end of #endif
> directive [-Wendif-labels]
> #endif LWIP_IPV4 && LWIP_IPV6
There is another warning, but I failed to see how to fix it:
lwip/src/core/dns.c:1483:10: warning: variable ‘fallback’ set but not used
[-Wunused-but-set-variable]
u8_t fallback;
#if LWIP_IPV4 && LWIP_IPV6
if ((dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) || (dns_addrtype ==
LWIP_DNS_ADDRTYPE_IPV4_IPV6)) {
/*
* That's twice the same condition or-ed. ^^^^^^^
*/
/* fallback to 2nd IP type and try again to lookup */
u8_t fallback;
if (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) {
fallback = LWIP_DNS_ADDRTYPE_IPV6;
} else {
fallback = LWIP_DNS_ADDRTYPE_IPV4;
}
if(dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) ==
ERR_OK) {
return ERR_OK;
}
/*
* should we use fallback instead of dns_addrtype here ? ^^^^^^^
*/
}
#endif /* LWIP_IPV4 && LWIP_IPV6 */
Sylvain
signature.asc
Description: Digital signature