From: Wouter Wijngaards Date: Mon, 8 Jun 2009 14:51:00 +0000 (+0000) Subject: lint, aliasing. X-Git-Tag: release-1.3.1~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c36960c29a3c159dd09026911e08a4233997994;p=thirdparty%2Funbound.git lint, aliasing. git-svn-id: file:///svn/unbound/trunk@1643 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/Makefile.in b/Makefile.in index 96c121a19..eec8c069f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,7 +69,7 @@ WINDRES=windres 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 +LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray INSTALL=$(srcdir)/install-sh ifeq "$(WITH_PYTHONMODULE)" "yes" diff --git a/doc/Changelog b/doc/Changelog index 9bf4b0163..8d5bc559e 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,8 @@ - 1.3.0 tarball for release created. - 1.3.1 development in svn trunk. - iana portlist updated. + - fix lint from complaining on ldns/sha.h. + - help compiler figure out aliasing in priv_rrset_bad() routine. 3 June 2009: Wouter - fixup bad free() when wrongly encoded DSA signature is seen. diff --git a/doc/TODO b/doc/TODO index 9d0fb46b0..02c66b2c0 100644 --- a/doc/TODO +++ b/doc/TODO @@ -72,8 +72,6 @@ o infra and lame cache: easier size config (in Mb), show usage in graphs. - fwd above stub, make hole in fwds - munin use ps to print total mem - no swig, but ask python, configure fails. -- iter/priv 227 strict aliasing stop compiler complaints -- fix lint complains on ldns/sha1 - fix indent # ifs - flush_* remove msg cache entry if one. - do not flush/delete callback queries or call error on callback at least. diff --git a/iterator/iter_priv.c b/iterator/iter_priv.c index 123c081ab..f6296560a 100644 --- a/iterator/iter_priv.c +++ b/iterator/iter_priv.c @@ -216,10 +216,10 @@ int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt, return 0; } else { /* so its a public name, check the address */ - struct sockaddr_storage addr; socklen_t len; struct rr_parse* rr; if(rrset->type == LDNS_RR_TYPE_A) { + struct sockaddr_storage addr; struct sockaddr_in* sa = (struct sockaddr_in*)&addr; len = (socklen_t)sizeof(*sa); memset(sa, 0, len); @@ -235,6 +235,7 @@ int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt, return 1; } } else if(rrset->type == LDNS_RR_TYPE_AAAA) { + struct sockaddr_storage addr; struct sockaddr_in6* sa = (struct sockaddr_in6*)&addr; len = (socklen_t)sizeof(*sa); memset(sa, 0, len);