Fix three clang complaints about the DNS code.
These are all already fixed upstream in the same way.
Change-Id: I2881b6d0fbd0237fffc0f00563bc14750dcce0d9
diff --git a/libc/dns/gethnamaddr.c b/libc/dns/gethnamaddr.c
index 6f30f75..80fdcbe 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 4a010d5..de09385 100644
--- a/libc/dns/resolv/res_send.c
+++ b/libc/dns/resolv/res_send.c
@@ -1277,8 +1277,6 @@
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 01f68e9..57791d1 100644
--- a/libc/dns/resolv/res_state.c
+++ b/libc/dns/resolv/res_state.c
@@ -211,10 +211,9 @@
}
void
-__res_put_state(res_state res)
+__res_put_state(res_state res __unused)
{
/* nothing to do */
- res=res;
}
res_static