]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] address warnings building exportlibs
authorEvan Hunt <each@isc.org>
Thu, 28 Feb 2013 23:23:08 +0000 (15:23 -0800)
committerEvan Hunt <each@isc.org>
Thu, 28 Feb 2013 23:23:08 +0000 (15:23 -0800)
lib/dns/view.c

index 51b50a60c8eebc048f766b4c45215a5c89562ae2..1ab945257742ae9abe7a6bd73da11e876f4d0bc3 100644 (file)
@@ -916,6 +916,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
 #ifndef BIND9
        UNUSED(use_hints);
        UNUSED(use_static_stub);
+       UNUSED(zone);
 #endif
 
        /*
@@ -940,11 +941,11 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
        /*
         * Find a database to answer the query.
         */
-       zone = NULL;
        db = NULL;
        node = NULL;
        is_staticstub_zone = ISC_FALSE;
 #ifdef BIND9
+       zone = NULL;
        result = dns_zt_find(view->zonetable, name, 0, NULL, &zone);
        if (zone != NULL && dns_zone_gettype(zone) == dns_zone_staticstub &&
            !use_static_stub) {
@@ -1192,11 +1193,14 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
        dns_rdataset_t zrdataset, zsigrdataset;
        dns_fixedname_t zfixedname;
 
+#ifndef BIND9
+       UNUSED(zone);
+#endif
+
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(view->frozen);
 
        db = NULL;
-       zone = NULL;
        use_zone = ISC_FALSE;
        try_hints = ISC_FALSE;
        zfname = NULL;
@@ -1212,6 +1216,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
         * Find the right database.
         */
 #ifdef BIND9
+       zone = NULL;
        result = dns_zt_find(view->zonetable, name, 0, NULL, &zone);
        if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
                result = dns_zone_getdb(zone, &db);