Fix build warnings in mdns.c introduced in my last commit

This commit is contained in:
Dirk Ziegelmeier 2018-01-03 06:31:59 +01:00
parent fa345b0f22
commit 744e69334d

View File

@ -1292,20 +1292,10 @@ mdns_init_outpacket(struct mdns_outpacket *out, struct mdns_packet *in)
static void static void
mdns_async_send_outpacket(void *arg) mdns_async_send_outpacket(void *arg)
{ {
const ip_addr_t *mcast_destaddr;
struct mdns_async_outpacket *outpkt = (struct mdns_async_outpacket *)arg; struct mdns_async_outpacket *outpkt = (struct mdns_async_outpacket *)arg;
struct pbuf *p = outpkt->pbuf; struct pbuf *p = outpkt->pbuf;
/* Send delayed packet */ /* Send delayed packet */
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Async sending packet len=%"U16_F"\n", p->tot_len)); LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Async sending packet len=%"U16_F"\n", p->tot_len));
if (IP_IS_V6_VAL(outpkt->dest_addr)) {
#if LWIP_IPV6
mcast_destaddr = &v6group;
#endif
} else {
#if LWIP_IPV4
mcast_destaddr = &v4group;
#endif
}
udp_sendto_if(mdns_pcb, p, &outpkt->dest_addr, outpkt->dest_port, outpkt->netif); udp_sendto_if(mdns_pcb, p, &outpkt->dest_addr, outpkt->dest_port, outpkt->netif);
pbuf_free(p); pbuf_free(p);
outpkt->pbuf = NULL; outpkt->pbuf = NULL;
@ -1508,7 +1498,7 @@ mdns_send_outpacket(struct mdns_outpacket *outpkt)
if (outpkt->answers > 1) { if (outpkt->answers > 1) {
struct mdns_async_outpacket *async_outpkt; struct mdns_async_outpacket *async_outpkt;
async_outpkt = mem_malloc(sizeof(struct mdns_async_outpacket)); async_outpkt = (struct mdns_async_outpacket *)mem_malloc(sizeof(struct mdns_async_outpacket));
if (async_outpkt) { if (async_outpkt) {
struct pbuf *p = outpkt->pbuf; struct pbuf *p = outpkt->pbuf;
u32_t msecs = 0; u32_t msecs = 0;