From 68c2755d71750401d82d9aa17774ebd385cb5dc0 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 7 Jul 2014 09:44:17 -0700 Subject: [PATCH] Fix three clang complaints about the DNS code. These are all already fixed upstream in the same way. Change-Id: I2881b6d0fbd0237fffc0f00563bc14750dcce0d9 --- libc/dns/gethnamaddr.c | 2 +- libc/dns/resolv/res_send.c | 2 -- libc/dns/resolv/res_state.c | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libc/dns/gethnamaddr.c b/libc/dns/gethnamaddr.c index 6f30f7571..80fdcbee1 100644 --- a/libc/dns/gethnamaddr.c +++ b/libc/dns/gethnamaddr.c @@ -90,7 +90,7 @@ // This should be synchronized to ResponseCode.h static const int DnsProxyQueryResult = 222; -static const char const AskedForGot[] = +static const char AskedForGot[] = "gethostby*.getanswer: asked for \"%s\", got \"%s\""; #define MAXPACKET (64*1024) diff --git a/libc/dns/resolv/res_send.c b/libc/dns/resolv/res_send.c index 4a010d53e..de093856a 100644 --- a/libc/dns/resolv/res_send.c +++ b/libc/dns/resolv/res_send.c @@ -1277,8 +1277,6 @@ Aerror(const res_state statp, FILE *file, const char *string, int error, char hbuf[NI_MAXHOST]; char sbuf[NI_MAXSERV]; - alen = alen; - if ((statp->options & RES_DEBUG) != 0U) { if (getnameinfo(address, (socklen_t)alen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), niflags)) { diff --git a/libc/dns/resolv/res_state.c b/libc/dns/resolv/res_state.c index 01f68e924..57791d1b9 100644 --- a/libc/dns/resolv/res_state.c +++ b/libc/dns/resolv/res_state.c @@ -211,10 +211,9 @@ __res_get_state(void) } void -__res_put_state(res_state res) +__res_put_state(res_state res __unused) { /* nothing to do */ - res=res; } res_static