From: Daniel Stenberg Date: Mon, 27 Dec 2010 12:18:54 +0000 (+0100) Subject: init_by_resolv_conf: fix compiler warnings X-Git-Tag: upstream/1.10.0~220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd6636c1387f4593f6df35297735a1632271da39;p=platform%2Fupstream%2Fc-ares.git init_by_resolv_conf: fix compiler warnings The code received the return codes in the 'status' variable without using it. Instead we just ignore those particular errors. --- diff --git a/ares_init.c b/ares_init.c index a10f7f3..d2f4a72 100644 --- a/ares_init.c +++ b/ares_init.c @@ -899,7 +899,8 @@ DhcpNameServer while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { if ((p = try_config(line, "hosts:", '\0')) && !channel->lookups) - status = config_lookup(channel, p, "dns", "files"); + /* ignore errors */ + (void)config_lookup(channel, p, "dns", "files"); } fclose(fp); } @@ -926,7 +927,8 @@ DhcpNameServer while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { if ((p = try_config(line, "order", '\0')) && !channel->lookups) - status = config_lookup(channel, p, "bind", "hosts"); + /* ignore errors */ + (void)config_lookup(channel, p, "bind", "hosts"); } fclose(fp); } @@ -953,7 +955,8 @@ DhcpNameServer while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { if ((p = try_config(line, "hosts=", '\0')) && !channel->lookups) - status = config_lookup(channel, p, "bind", "local"); + /* ignore errors */ + (void)config_lookup(channel, p, "bind", "local"); } fclose(fp); }