]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
address shadow warning
authorMark Andrews <marka@isc.org>
Thu, 12 Jan 2017 22:13:57 +0000 (09:13 +1100)
committerMark Andrews <marka@isc.org>
Thu, 12 Jan 2017 22:13:57 +0000 (09:13 +1100)
bin/tests/byname_test.c
bin/tests/rdata_test.c

index abe3d878f0270f163da9b74bf81d2146ae3b6ec0..d0c6042a5bf909378d5ae45164201a8b754f8484 100644 (file)
@@ -43,7 +43,7 @@ static isc_taskmgr_t *taskmgr;
 static dns_view_t *view = NULL;
 static dns_adbfind_t *find = NULL;
 static isc_task_t *task = NULL;
-static dns_fixedname_t name;
+static dns_fixedname_t fixed;
 static dns_fixedname_t target;
 static isc_log_t *lctx;
 static isc_logconfig_t *lcfg;
@@ -83,10 +83,10 @@ log_init(void) {
 }
 
 static void
-print_addresses(dns_adbfind_t *find) {
+print_addresses(dns_adbfind_t *adbfind) {
        dns_adbaddrinfo_t *address;
 
-       for (address = ISC_LIST_HEAD(find->list);
+       for (address = ISC_LIST_HEAD(adbfind->list);
             address != NULL;
             address = ISC_LIST_NEXT(address, publink)) {
                isc_netaddr_t netaddr;
@@ -116,7 +116,7 @@ do_find(isc_boolean_t want_event) {
                options |= DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_EMPTYEVENT;
        dns_fixedname_init(&target);
        result = dns_adb_createfind(view->adb, task, adb_callback, NULL,
-                                   dns_fixedname_name(&name),
+                                   dns_fixedname_name(&fixed),
                                    dns_rootname, 0, options, 0,
                                    dns_fixedname_name(&target), 0,
                                    &find);
@@ -183,8 +183,8 @@ adb_callback(isc_task_t *etask, isc_event_t *event) {
 }
 
 static void
-run(isc_task_t *task, isc_event_t *event) {
-       UNUSED(task);
+run(isc_task_t *xtask, isc_event_t *event) {
+       UNUSED(xtask);
        do_find(ISC_TRUE);
        isc_event_free(&event);
 }
@@ -332,9 +332,9 @@ main(int argc, char *argv[]) {
        isc_buffer_init(&b, argv[isc_commandline_index],
                        strlen(argv[isc_commandline_index]));
        isc_buffer_add(&b, strlen(argv[isc_commandline_index]));
-       dns_fixedname_init(&name);
+       dns_fixedname_init(&fixed);
        dns_fixedname_init(&target);
-       RUNTIME_CHECK(dns_name_fromtext(dns_fixedname_name(&name), &b,
+       RUNTIME_CHECK(dns_name_fromtext(dns_fixedname_name(&fixed), &b,
                                        dns_rootname, 0, NULL) ==
                      ISC_R_SUCCESS);
 
index b1d8aa64fbcbcdf2b90c56c2d394d06e162d4fd7..953cb6c29a31ab62e42b8fa95d36a2fda956e311 100644 (file)
@@ -25,8 +25,6 @@
 #include <dns/rdatatype.h>
 #include <dns/result.h>
 
-isc_mem_t *mctx;
-isc_lex_t *lex;
 
 isc_lexspecials_t specials;
 
@@ -889,6 +887,8 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
 
 int
 main(int argc, char *argv[]) {
+       isc_mem_t *mctx = NULL;
+       isc_lex_t *lex = NULL;
        isc_token_t token;
        isc_result_t result;
        int quiet = 0;