aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-16 20:02:12 +0000
committerYang Tse <yangsita@gmail.com>2009-11-16 20:02:12 +0000
commit09526fc9e9639707f18badb0d739eae9dc361d08 (patch)
tree1c9e213cd4869dd1ef173e9a8968a0b553d6a542
parentf0068267ee032da213e57debca8cf5aa6ab67684 (diff)
Fix icc 9.0 compiler warning: external definition with no prior declaration
-rw-r--r--ares/adig.c3
-rw-r--r--ares/ares_getopt.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/ares/adig.c b/ares/adig.c
index 2a0b43c5c..e796a2c0d 100644
--- a/ares/adig.c
+++ b/ares/adig.c
@@ -157,7 +157,6 @@ static const char *opcodes[] = {
"UPDATEA", "UPDATED", "UPDATEDA", "UPDATEM", "UPDATEMA",
"ZONEINIT", "ZONEREF"
};
- struct in_addr inaddr;
static const char *rcodes[] = {
"NOERROR", "FORMERR", "SERVFAIL", "NXDOMAIN", "NOTIMP", "REFUSED",
@@ -165,6 +164,8 @@ static const char *rcodes[] = {
"(unknown)", "(unknown)", "(unknown)", "(unknown)", "NOCHANGE"
};
+static struct in_addr inaddr;
+
static void callback(void *arg, int status, int timeouts,
unsigned char *abuf, int alen);
static const unsigned char *display_question(const unsigned char *aptr,
diff --git a/ares/ares_getopt.c b/ares/ares_getopt.c
index 177b26fea..59f3b8834 100644
--- a/ares/ares_getopt.c
+++ b/ares/ares_getopt.c
@@ -50,9 +50,9 @@
#include "ares_getopt.h"
int opterr = 1, /* if error message should be printed */
- optind = 1, /* index into parent argv vector */
- optopt, /* character checked for validity */
- optreset; /* reset getopt */
+ optind = 1; /* index into parent argv vector */
+static int optopt; /* character checked for validity */
+static int optreset; /* reset getopt */
char *optarg; /* argument associated with option */
#define BADCH (int)'?'