From 8103915797062626db15f840f975cf4bafcc328c Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 17 Feb 2007 11:34:33 +0000 Subject: [PATCH] compiler warning fix --- ares/ares_gethostbyaddr.c | 4 +--- ares/ares_search.c | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c index 6c80eb941f..777d2f7a06 100644 --- a/ares/ares_gethostbyaddr.c +++ b/ares/ares_gethostbyaddr.c @@ -188,6 +188,7 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host) int status; #ifdef WIN32 + int error; char PATH_HOSTS[MAX_PATH]; if (IS_NT()) { char tmp[MAX_PATH]; @@ -216,8 +217,6 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host) return ARES_ENOTFOUND; #endif - int error; - fp = fopen(PATH_HOSTS, "r"); if (!fp) { @@ -226,7 +225,6 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host) { case ENOENT: return ARES_ENOTFOUND; - break; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", error, strerror(error))); diff --git a/ares/ares_search.c b/ares/ares_search.c index e63afff052..4b898a77f9 100644 --- a/ares/ares_search.c +++ b/ares/ares_search.c @@ -20,6 +20,7 @@ #include #include #include +#include #if defined(WIN32) && !defined(WATT32) #include "nameser.h" -- 2.47.3