mdns: silence some unused variable warnings.

This commit is contained in:
Our Air Quality 2017-12-08 12:18:42 +11:00 committed by goldsimon
parent 0527c1bdf5
commit 31c60775b6

View File

@ -485,6 +485,8 @@ mdns_build_reverse_v4_domain(struct mdns_domain *domain, const ip4_addr_t *addr)
int i;
err_t res;
const u8_t *ptr;
LWIP_UNUSED_ARG(res);
if (!domain || !addr) {
return ERR_ARG;
}
@ -522,6 +524,8 @@ mdns_build_reverse_v6_domain(struct mdns_domain *domain, const ip6_addr_t *addr)
{
int i;
err_t res;
LWIP_UNUSED_ARG(res);
const u8_t *ptr;
if (!domain || !addr) {
return ERR_ARG;
@ -559,6 +563,7 @@ static err_t
mdns_add_dotlocal(struct mdns_domain *domain)
{
err_t res = mdns_domain_add_label(domain, TOPDOMAIN_LOCAL, (u8_t)(sizeof(TOPDOMAIN_LOCAL) - 1));
LWIP_UNUSED_ARG(res);
LWIP_ERROR("mdns_add_dotlocal: Failed to add label", (res == ERR_OK), return res);
return mdns_domain_add_label(domain, NULL, 0);
}
@ -573,6 +578,7 @@ static err_t
mdns_build_host_domain(struct mdns_domain *domain, struct mdns_host *mdns)
{
err_t res;
LWIP_UNUSED_ARG(res);
memset(domain, 0, sizeof(struct mdns_domain));
LWIP_ERROR("mdns_build_host_domain: mdns != NULL", (mdns != NULL), return ERR_VAL);
res = mdns_domain_add_label(domain, mdns->name, (u8_t)strlen(mdns->name));
@ -589,6 +595,7 @@ static err_t
mdns_build_dnssd_domain(struct mdns_domain *domain)
{
err_t res;
LWIP_UNUSED_ARG(res);
memset(domain, 0, sizeof(struct mdns_domain));
res = mdns_domain_add_label(domain, "_services", (u8_t)(sizeof("_services") - 1));
LWIP_ERROR("mdns_build_dnssd_domain: Failed to add label", (res == ERR_OK), return res);
@ -612,6 +619,7 @@ static err_t
mdns_build_service_domain(struct mdns_domain *domain, struct mdns_service *service, int include_name)
{
err_t res;
LWIP_UNUSED_ARG(res);
memset(domain, 0, sizeof(struct mdns_domain));
if (include_name) {
res = mdns_domain_add_label(domain, service->name, (u8_t)strlen(service->name));