From: Wouter Wijngaards Date: Thu, 16 Feb 2012 10:08:07 +0000 (+0000) Subject: lint and doxygen fixes. X-Git-Tag: release-1.4.17rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=682ff957ed045130971fa605c485a34585e41fd3;p=thirdparty%2Funbound.git lint and doxygen fixes. git-svn-id: file:///svn/unbound/trunk@2631 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/Makefile.in b/Makefile.in index d67074108..011c04a2d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -63,7 +63,7 @@ LINT=splint LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list #-Dglob64=glob -Dglobfree64=globfree # compat with openssl linux edition. -LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" +LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" # compat with NetBSD LINTFLAGS+=@NETBSD_LINTFLAGS@ # compat with OpenBSD diff --git a/services/cache/infra.c b/services/cache/infra.c index 06c5e947b..dbbd50326 100644 --- a/services/cache/infra.c +++ b/services/cache/infra.c @@ -438,9 +438,9 @@ int infra_get_host_rto(struct infra_cache* infra, *delay = (int)(data->probedelay - timenow); else *delay = 0; } - *tA = data->timeout_A; - *tAAAA = data->timeout_AAAA; - *tother = data->timeout_other; + *tA = (int)data->timeout_A; + *tAAAA = (int)data->timeout_AAAA; + *tother = (int)data->timeout_other; lock_rw_unlock(&e->lock); return ttl; } diff --git a/services/outside_network.c b/services/outside_network.c index 3282f60e3..086960be6 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -1815,7 +1815,7 @@ outnet_serviced_query(struct outside_network* outnet, /* make new serviced query entry */ sq = serviced_create(outnet, buff, dnssec, want_dnssec, tcp_upstream, ssl_upstream, addr, addrlen, zone, - zonelen, qtype); + zonelen, (int)qtype); if(!sq) { free(cb); return NULL; diff --git a/testcode/fake_event.c b/testcode/fake_event.c index 8271d0092..159ea3089 100644 --- a/testcode/fake_event.c +++ b/testcode/fake_event.c @@ -1085,7 +1085,7 @@ struct serviced_query* outnet_serviced_query(struct outside_network* outnet, pend->addrlen = addrlen; pend->zone = memdup(zone, zonelen); pend->zonelen = zonelen; - pend->qtype = qtype; + pend->qtype = (int)qtype; log_assert(pend->zone); pend->callback = callback; pend->cb_arg = callback_arg; diff --git a/validator/val_anchor.c b/validator/val_anchor.c index 5e4c12add..d02b42379 100644 --- a/validator/val_anchor.c +++ b/validator/val_anchor.c @@ -931,7 +931,6 @@ assemble_it(struct trust_anchor* ta, size_t num, uint16_t type) /** * Assemble structures for the trust DS and DNSKEY rrsets. - * @param anchors: trust anchor storage. * @param ta: trust anchor * @return: false on error. */ @@ -1251,7 +1250,7 @@ anchors_delete_insecure(struct val_anchors* anchors, uint16_t c, } /* remove from tree */ - rbtree_delete(anchors->tree, &ta->node); + (void)rbtree_delete(anchors->tree, &ta->node); anchors_init_parents_locked(anchors); lock_basic_unlock(&anchors->lock); diff --git a/validator/val_sigcrypt.c b/validator/val_sigcrypt.c index b63cc2dd6..4c79c004d 100644 --- a/validator/val_sigcrypt.c +++ b/validator/val_sigcrypt.c @@ -1387,9 +1387,9 @@ setup_ecdsa_sig(unsigned char** sig, unsigned int* len) { ECDSA_SIG* ecdsa_sig; int newlen; - unsigned int bnsize = (*len)/2; + int bnsize = (int)((*len)/2); /* if too short or not even length, fails */ - if(*len < 16 || bnsize*2 != *len) + if(*len < 16 || bnsize*2 != (int)*len) return 0; /* use the raw data to parse two evenly long BIGNUMs, "r | s". */ ecdsa_sig = ECDSA_SIG_new();