- Patch from Florian Obser fixes some compiler warnings:

include mini_event.h to have a prototype for mini_ev_cmp
  include edns.h to have a prototype for apply_edns_options
  sldns_wire2str_edns_keepalive_print is only called in the wire2str,
  module declare it static to get rid of compiler warning:
  no previous prototype for function
  infra_find_ip_ratedata() is only called in the infra module,
  declare it static to get rid of compiler warning:
  no previous prototype for function
  do not shadow local variable buf in authzone
  auth_chunks_delete and az_nsec3_findnode are only called in the
  authzone module, declare them static to get rid of compiler warning:
  no previous prototype for function...
  copy_rrset() is only called in the respip module, declare it
  static to get rid of compiler warning:
  no previous prototype for function 'copy_rrset'
  no need for another variable "r"; gets rid of compiler warning:
  declaration shadows a local variable in libunbound.c
  no need for another variable "ns"; gets rid of compiler warning:
  declaration shadows a local variable in iterator.c



git-svn-id: file:///svn/unbound/trunk@5072 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2019-01-24 16:05:00 +00:00
parent e584933b2b
commit 3028fa50a8
9 changed files with 35 additions and 14 deletions

View File

@ -10,6 +10,26 @@
testcode for unknown macro operand give zero result. Initialise the testcode for unknown macro operand give zero result. Initialise the
passed argv array in test code. In test code add EDNS data passed argv array in test code. In test code add EDNS data
segment copy only when nonempty. segment copy only when nonempty.
- Patch from Florian Obser fixes some compiler warnings:
include mini_event.h to have a prototype for mini_ev_cmp
include edns.h to have a prototype for apply_edns_options
sldns_wire2str_edns_keepalive_print is only called in the wire2str,
module declare it static to get rid of compiler warning:
no previous prototype for function
infra_find_ip_ratedata() is only called in the infra module,
declare it static to get rid of compiler warning:
no previous prototype for function
do not shadow local variable buf in authzone
auth_chunks_delete and az_nsec3_findnode are only called in the
authzone module, declare them static to get rid of compiler warning:
no previous prototype for function...
copy_rrset() is only called in the respip module, declare it
static to get rid of compiler warning:
no previous prototype for function 'copy_rrset'
no need for another variable "r"; gets rid of compiler warning:
declaration shadows a local variable in libunbound.c
no need for another variable "ns"; gets rid of compiler warning:
declaration shadows a local variable in iterator.c
23 January 2018: Wouter 23 January 2018: Wouter
- Patch from Manabu Sonoda with tls-ciphers and tls-ciphersuites - Patch from Manabu Sonoda with tls-ciphers and tls-ciphersuites

View File

@ -1882,7 +1882,6 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
struct delegpt* p = hints_lookup_root(qstate->env->hints, struct delegpt* p = hints_lookup_root(qstate->env->hints,
iq->qchase.qclass); iq->qchase.qclass);
if(p) { if(p) {
struct delegpt_ns* ns;
struct delegpt_addr* a; struct delegpt_addr* a;
iq->chase_flags &= ~BIT_RD; /* go to authorities */ iq->chase_flags &= ~BIT_RD; /* go to authorities */
for(ns = p->nslist; ns; ns=ns->next) { for(ns = p->nslist; ns; ns=ns->next) {

View File

@ -724,7 +724,7 @@ ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
*async_id = 0; *async_id = 0;
lock_basic_lock(&ctx->cfglock); lock_basic_lock(&ctx->cfglock);
if(!ctx->finalized) { if(!ctx->finalized) {
int r = context_finalize(ctx); r = context_finalize(ctx);
if(r) { if(r) {
lock_basic_unlock(&ctx->cfglock); lock_basic_unlock(&ctx->cfglock);
return r; return r;

View File

@ -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 * This function returns the copied rrset key on success, and NULL on memory
* allocation failure. * 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) copy_rrset(const struct ub_packed_rrset_key* key, struct regional* region)
{ {
struct ub_packed_rrset_key* ck = regional_alloc(region, struct ub_packed_rrset_key* ck = regional_alloc(region,

View File

@ -1982,7 +1982,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 * @param at: transfer structure with chunks list. The chunks and their
* data are freed. * data are freed.
*/ */
void static void
auth_chunks_delete(struct auth_transfer* at) auth_chunks_delete(struct auth_transfer* at)
{ {
if(at->chunks_first) { if(at->chunks_first) {
@ -2621,7 +2621,7 @@ az_nsec3_hashname(struct auth_zone* z, uint8_t* hashname, size_t* hashnmlen,
} }
/** Find the datanode that covers the nsec3hash-name */ /** 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) az_nsec3_findnode(struct auth_zone* z, uint8_t* hashnm, size_t hashnmlen)
{ {
struct query_info qinfo; struct query_info qinfo;
@ -4997,12 +4997,12 @@ xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
qinfo.qtype = LDNS_RR_TYPE_AAAA; qinfo.qtype = LDNS_RR_TYPE_AAAA;
qinfo.local_alias = NULL; qinfo.local_alias = NULL;
if(verbosity >= VERB_ALGO) { if(verbosity >= VERB_ALGO) {
char buf[512]; char buf1[512];
char buf2[LDNS_MAX_DOMAINLEN+1]; char buf2[LDNS_MAX_DOMAINLEN+1];
dname_str(xfr->name, buf2); 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); " for task_transfer", buf2);
log_query_info(VERB_ALGO, buf, &qinfo); log_query_info(VERB_ALGO, buf1, &qinfo);
} }
edns.edns_present = 1; edns.edns_present = 1;
edns.ext_rcode = 0; edns.ext_rcode = 0;
@ -6037,12 +6037,12 @@ xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
qinfo.qtype = LDNS_RR_TYPE_AAAA; qinfo.qtype = LDNS_RR_TYPE_AAAA;
qinfo.local_alias = NULL; qinfo.local_alias = NULL;
if(verbosity >= VERB_ALGO) { if(verbosity >= VERB_ALGO) {
char buf[512]; char buf1[512];
char buf2[LDNS_MAX_DOMAINLEN+1]; char buf2[LDNS_MAX_DOMAINLEN+1];
dname_str(xfr->name, buf2); 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); " for task_probe", buf2);
log_query_info(VERB_ALGO, buf, &qinfo); log_query_info(VERB_ALGO, buf1, &qinfo);
} }
edns.edns_present = 1; edns.edns_present = 1;
edns.ext_rcode = 0; edns.ext_rcode = 0;

View File

@ -808,7 +808,7 @@ static struct lruhash_entry* infra_find_ratedata(struct infra_cache* infra,
} }
/** find data item in array for ip addresses */ /** 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 comm_reply* repinfo, int wr)
{ {
struct ip_rate_key key; struct ip_rate_key key;

View File

@ -1908,8 +1908,8 @@ int sldns_wire2str_edns_subnet_print(char** s, size_t* sl, uint8_t* data,
return w; return w;
} }
int sldns_wire2str_edns_keepalive_print(char** s, size_t* sl, uint8_t* data, static int sldns_wire2str_edns_keepalive_print(char** s, size_t* sl,
size_t len) uint8_t* data, size_t len)
{ {
int w = 0; int w = 0;
uint16_t timeout; uint16_t timeout;

View File

@ -42,6 +42,7 @@
#include "config.h" #include "config.h"
#include "util/config_file.h" #include "util/config_file.h"
#include "util/edns.h"
#include "util/netevent.h" #include "util/netevent.h"
#include "util/regional.h" #include "util/regional.h"
#include "util/data/msgparse.h" #include "util/data/msgparse.h"

View File

@ -41,6 +41,7 @@
*/ */
#include "config.h" #include "config.h"
#include "util/mini_event.h"
#ifdef HAVE_TIME_H #ifdef HAVE_TIME_H
#include <time.h> #include <time.h>
#endif #endif