]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
lint, aliasing.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 8 Jun 2009 14:51:00 +0000 (14:51 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 8 Jun 2009 14:51:00 +0000 (14:51 +0000)
git-svn-id: file:///svn/unbound/trunk@1643 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
doc/Changelog
doc/TODO
iterator/iter_priv.c

index 96c121a19ff7798b4dd4794da369b73071778a16..eec8c069ff9a76bb8ea9f28a2566500b1d717263 100644 (file)
@@ -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"
index 9bf4b01634fb1d7d0900b3dd7c8007076005160c..8d5bc559e78322eac85a6909c0ad34e408c88239 100644 (file)
@@ -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.
index 9d0fb46b0b56570843658a0d732a6318ddbe8ead..02c66b2c01c5f15b0b87f1e26a18fa6404a58dfb 100644 (file)
--- 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.
index 123c081ab52b37962f8092a4cd92753bc83f00fc..f6296560a6583db77763fe368d1fb61aba221251 100644 (file)
@@ -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);