summaryrefslogtreecommitdiff
path: root/sbin/unwind
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-01-24 15:38:11 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-01-24 15:38:11 +0000
commitbf12fddba2b3418f5675decb83852a40d13773db (patch)
tree54cac012b6ce611016f40ac0ed4b96933cc0d6ab /sbin/unwind
parent271b3670e4ef026110a6c7519413b41e5961ea79 (diff)
Fix a bunch of shadow and missing prototype compiler warnings.
Diffstat (limited to 'sbin/unwind')
-rw-r--r--sbin/unwind/libunbound/iterator/iterator.c1
-rw-r--r--sbin/unwind/libunbound/libunbound/libunbound.c2
-rw-r--r--sbin/unwind/libunbound/respip/respip.c2
-rw-r--r--sbin/unwind/libunbound/services/authzone.c16
-rw-r--r--sbin/unwind/libunbound/services/cache/infra.c2
-rw-r--r--sbin/unwind/libunbound/sldns/wire2str.c4
-rw-r--r--sbin/unwind/libunbound/util/edns.c1
-rw-r--r--sbin/unwind/libunbound/util/mini_event.c1
8 files changed, 15 insertions, 14 deletions
diff --git a/sbin/unwind/libunbound/iterator/iterator.c b/sbin/unwind/libunbound/iterator/iterator.c
index f66381b401f..75fd23456d5 100644
--- a/sbin/unwind/libunbound/iterator/iterator.c
+++ b/sbin/unwind/libunbound/iterator/iterator.c
@@ -1882,7 +1882,6 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
struct delegpt* p = hints_lookup_root(qstate->env->hints,
iq->qchase.qclass);
if(p) {
- struct delegpt_ns* ns;
struct delegpt_addr* a;
iq->chase_flags &= ~BIT_RD; /* go to authorities */
for(ns = p->nslist; ns; ns=ns->next) {
diff --git a/sbin/unwind/libunbound/libunbound/libunbound.c b/sbin/unwind/libunbound/libunbound/libunbound.c
index 31adbd54dcd..0e59364d522 100644
--- a/sbin/unwind/libunbound/libunbound/libunbound.c
+++ b/sbin/unwind/libunbound/libunbound/libunbound.c
@@ -724,7 +724,7 @@ ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
*async_id = 0;
lock_basic_lock(&ctx->cfglock);
if(!ctx->finalized) {
- int r = context_finalize(ctx);
+ r = context_finalize(ctx);
if(r) {
lock_basic_unlock(&ctx->cfglock);
return r;
diff --git a/sbin/unwind/libunbound/respip/respip.c b/sbin/unwind/libunbound/respip/respip.c
index aea528f1516..bcb31f89224 100644
--- a/sbin/unwind/libunbound/respip/respip.c
+++ b/sbin/unwind/libunbound/respip/respip.c
@@ -451,7 +451,7 @@ respip_views_apply_cfg(struct views* vs, struct config_file* cfg,
* This function returns the copied rrset key on success, and NULL on memory
* allocation failure.
*/
-struct ub_packed_rrset_key*
+static struct ub_packed_rrset_key*
copy_rrset(const struct ub_packed_rrset_key* key, struct regional* region)
{
struct ub_packed_rrset_key* ck = regional_alloc(region,
diff --git a/sbin/unwind/libunbound/services/authzone.c b/sbin/unwind/libunbound/services/authzone.c
index e30858d435d..0dc88e692a2 100644
--- a/sbin/unwind/libunbound/services/authzone.c
+++ b/sbin/unwind/libunbound/services/authzone.c
@@ -1979,7 +1979,7 @@ int auth_zones_apply_cfg(struct auth_zones* az, struct config_file* cfg,
* @param at: transfer structure with chunks list. The chunks and their
* data are freed.
*/
-void
+static void
auth_chunks_delete(struct auth_transfer* at)
{
if(at->chunks_first) {
@@ -2618,7 +2618,7 @@ az_nsec3_hashname(struct auth_zone* z, uint8_t* hashname, size_t* hashnmlen,
}
/** Find the datanode that covers the nsec3hash-name */
-struct auth_data*
+static struct auth_data*
az_nsec3_findnode(struct auth_zone* z, uint8_t* hashnm, size_t hashnmlen)
{
struct query_info qinfo;
@@ -4988,12 +4988,12 @@ xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
qinfo.qtype = LDNS_RR_TYPE_AAAA;
qinfo.local_alias = NULL;
if(verbosity >= VERB_ALGO) {
- char buf[512];
+ char buf1[512];
char buf2[LDNS_MAX_DOMAINLEN+1];
dname_str(xfr->name, buf2);
- snprintf(buf, sizeof(buf), "auth zone %s: master lookup"
+ snprintf(buf1, sizeof(buf1), "auth zone %s: master lookup"
" for task_transfer", buf2);
- log_query_info(VERB_ALGO, buf, &qinfo);
+ log_query_info(VERB_ALGO, buf1, &qinfo);
}
edns.edns_present = 1;
edns.ext_rcode = 0;
@@ -6010,12 +6010,12 @@ xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
qinfo.qtype = LDNS_RR_TYPE_AAAA;
qinfo.local_alias = NULL;
if(verbosity >= VERB_ALGO) {
- char buf[512];
+ char buf1[512];
char buf2[LDNS_MAX_DOMAINLEN+1];
dname_str(xfr->name, buf2);
- snprintf(buf, sizeof(buf), "auth zone %s: master lookup"
+ snprintf(buf1, sizeof(buf1), "auth zone %s: master lookup"
" for task_probe", buf2);
- log_query_info(VERB_ALGO, buf, &qinfo);
+ log_query_info(VERB_ALGO, buf1, &qinfo);
}
edns.edns_present = 1;
edns.ext_rcode = 0;
diff --git a/sbin/unwind/libunbound/services/cache/infra.c b/sbin/unwind/libunbound/services/cache/infra.c
index 489f939491d..07c41928d67 100644
--- a/sbin/unwind/libunbound/services/cache/infra.c
+++ b/sbin/unwind/libunbound/services/cache/infra.c
@@ -808,7 +808,7 @@ static struct lruhash_entry* infra_find_ratedata(struct infra_cache* infra,
}
/** find data item in array for ip addresses */
-struct lruhash_entry* infra_find_ip_ratedata(struct infra_cache* infra,
+static struct lruhash_entry* infra_find_ip_ratedata(struct infra_cache* infra,
struct comm_reply* repinfo, int wr)
{
struct ip_rate_key key;
diff --git a/sbin/unwind/libunbound/sldns/wire2str.c b/sbin/unwind/libunbound/sldns/wire2str.c
index 832239f9b76..01ec84b3c50 100644
--- a/sbin/unwind/libunbound/sldns/wire2str.c
+++ b/sbin/unwind/libunbound/sldns/wire2str.c
@@ -1908,8 +1908,8 @@ int sldns_wire2str_edns_subnet_print(char** s, size_t* sl, uint8_t* data,
return w;
}
-int sldns_wire2str_edns_keepalive_print(char** s, size_t* sl, uint8_t* data,
- size_t len)
+static int sldns_wire2str_edns_keepalive_print(char** s, size_t* sl,
+ uint8_t* data, size_t len)
{
int w = 0;
uint16_t timeout;
diff --git a/sbin/unwind/libunbound/util/edns.c b/sbin/unwind/libunbound/util/edns.c
index 2c4e4a1fd27..1fa6b2921c6 100644
--- a/sbin/unwind/libunbound/util/edns.c
+++ b/sbin/unwind/libunbound/util/edns.c
@@ -42,6 +42,7 @@
#include "config.h"
#include "util/config_file.h"
+#include "util/edns.h"
#include "util/netevent.h"
#include "util/regional.h"
#include "util/data/msgparse.h"
diff --git a/sbin/unwind/libunbound/util/mini_event.c b/sbin/unwind/libunbound/util/mini_event.c
index 14e9efe4790..ee517b263a0 100644
--- a/sbin/unwind/libunbound/util/mini_event.c
+++ b/sbin/unwind/libunbound/util/mini_event.c
@@ -41,6 +41,7 @@
*/
#include "config.h"
+#include "util/mini_event.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif