Commit 1015ce24 authored by Mark Andrews's avatar Mark Andrews
Browse files

address discards const warnings; address shadow warning

parent ed07d7a8
......@@ -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);
......
......@@ -361,7 +361,7 @@ main(int argc, char *argv[]) {
const char *origintext;
dbinfo *dbi;
dns_dbversion_t *version;
dns_name_t *origin;
const dns_name_t *origin;
size_t memory_quota = 0;
dns_trust_t trust = 0;
unsigned int addopts;
......
......@@ -27,7 +27,7 @@
isc_mem_t *mctx;
static isc_result_t
print_dataset(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
print_dataset(void *arg, const dns_name_t *owner, dns_rdataset_t *dataset) {
char buf[64*1024];
isc_buffer_t target;
isc_result_t result;
......
......@@ -64,7 +64,8 @@ main(int argc, char *argv[]) {
dns_fixedname_t wname, wname2, oname, compname, downname;
isc_buffer_t source;
isc_region_t r;
dns_name_t *name, *origin, *comp, *down;
dns_name_t *name, *comp, *down;
const dns_name_t *origin;
unsigned int downcase = 0;
size_t len;
isc_boolean_t quiet = ISC_FALSE;
......@@ -118,8 +119,7 @@ main(int argc, char *argv[]) {
isc_buffer_init(&source, argv[0], len);
isc_buffer_add(&source, len);
dns_fixedname_init(&oname);
origin = &oname.name;
result = dns_name_fromtext(origin, &source,
result = dns_name_fromtext(&oname.name, &source,
dns_rootname, 0, NULL);
if (result != 0) {
fprintf(stderr,
......@@ -127,6 +127,7 @@ main(int argc, char *argv[]) {
result);
exit(1);
}
origin = &oname.name;
}
} else if (concatenate)
origin = NULL;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment