]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Patch from Florian Obser fixes some compiler warnings:
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 24 Jan 2019 16:05:00 +0000 (16:05 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 24 Jan 2019 16:05:00 +0000 (16:05 +0000)
  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

doc/Changelog
iterator/iterator.c
libunbound/libunbound.c
respip/respip.c
services/authzone.c
services/cache/infra.c
sldns/wire2str.c
util/edns.c
util/mini_event.c

index 3bd7d86c4710b89aaa1d30abdab30a72e73438bf..b9bbd872085a987f4c07c41ff848b909429742ea 100644 (file)
          testcode for unknown macro operand give zero result. Initialise the
          passed argv array in test code.  In test code add EDNS data
          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
        - Patch from Manabu Sonoda with tls-ciphers and tls-ciphersuites
index a3b52806a8893452f38057cd2777806da2e3d832..8312dfd53313f2fc3abe5fbe03b83e11186e3f9d 100644 (file)
@@ -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) {
index 31adbd54dcdbc62841f8d8d03ee4aedf578d7073..0e59364d5220783807bfb4f168c69febcdd8b190 100644 (file)
@@ -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;
index aea528f1516e0ac5c529f8631d5cabcacd51dd6d..bcb31f89224dd0bef4cf8539569bb9fac6dcb7c5 100644 (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
  * 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,
index 03991d9b8a409a8aa187023079cd10b866852d37..a87c2274fb9eccacade2c42c3019f142b866e390 100644 (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
  *     data are freed.
  */
-void
+static void
 auth_chunks_delete(struct auth_transfer* at)
 {
        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 */
-struct auth_data*
+static struct auth_data*
 az_nsec3_findnode(struct auth_zone* z, uint8_t* hashnm, size_t hashnmlen)
 {
        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.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;
@@ -6037,12 +6037,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;
index 489f939491d7f9c6d84a6100a1103fc69dc0db99..07c41928d67e50ac42254843ae20e8481b7839f3 100644 (file)
@@ -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;
index 832239f9b76a2439dd3cc8530600e103e19e0ac6..01ec84b3c50696b21135c866d5fc1c18f257e94d 100644 (file)
@@ -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;
index 2c4e4a1fd2753337d58707344ab88e41b7db6d04..1fa6b2921c69ba6439869e966e761307a0b66308 100644 (file)
@@ -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"
index 14e9efe4790dc0f16c2f8ca369dbd7933b1002c6..ee517b263a0f4e3a26978b2844ebb59b5f0c2759 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 #include "config.h"
+#include "util/mini_event.h"
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif