address shadow warning

This commit is contained in:
Mark Andrews 2017-01-13 09:13:57 +11:00
parent 445b0e72d7
commit c2687b0594
2 changed files with 10 additions and 10 deletions

View 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);

View 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;