clean up a couple of compiler warnings

pull/431/head
bradh352 3 years ago
parent 778d7cd9e7
commit e3cb402bbe
  1. 3
      src/lib/ares__addrinfo_localhost.c
  2. 4
      src/lib/ares__parse_into_addrinfo.c
  3. 2
      src/lib/ares_parse_uri_reply.c

@ -188,6 +188,9 @@ fail:
return status;
#else
(void)aftype;
(void)port;
(void)nodes;
/* Not supported on any other OS at this time */
return ARES_ENOTFOUND;
#endif

@ -52,9 +52,7 @@ int ares__parse_into_addrinfo(const unsigned char *abuf,
char *question_hostname = NULL;
char *hostname, *rr_name = NULL, *rr_data;
struct ares_addrinfo_cname *cname, *cnames = NULL;
struct ares_addrinfo_node *node, *nodes = NULL;
struct sockaddr_in *sin;
struct sockaddr_in6 *sin6;
struct ares_addrinfo_node *nodes = NULL;
/* Give up if abuf doesn't have room for a header. */
if (alen < HFIXEDSZ)

@ -148,7 +148,7 @@ ares_parse_uri_reply (const unsigned char *abuf, int alen,
status = ARES_ENOMEM;
break;
}
uri_curr->uri = strncpy(uri_curr->uri, vptr, rr_len-4);
uri_curr->uri = strncpy(uri_curr->uri, (const char *)vptr, rr_len-4);
uri_curr->uri[rr_len-4]='\0';
uri_curr->ttl = rr_ttl;

Loading…
Cancel
Save