]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
more lint happiness
authorYuri Schaeffer <yuri@nlnetlabs.nl>
Mon, 21 Jan 2013 15:42:21 +0000 (15:42 +0000)
committerYuri Schaeffer <yuri@nlnetlabs.nl>
Mon, 21 Jan 2013 15:42:21 +0000 (15:42 +0000)
git-svn-id: file:///svn/unbound/branches/edns-subnet@2818 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/unbound.c
edns-subnet/edns-subnet.c
edns-subnet/subnetmod.c
services/outside_network.c
smallapp/unbound-anchor.c
util/storage/lookup3.c
validator/autotrust.c
validator/val_anchor.c
validator/val_nsec3.c

index 377396fc4d01a2fc83b269beb33d60393dc5fed5..87679a0882a8a4d926c0cfa8b15b8edbf25dc80f 100644 (file)
@@ -521,7 +521,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
                 * also resource limits from login config, but we
                 * still call setresuid, setresgid to be sure to set all uid*/
                if(setusercontext(NULL, pwd, uid,
-                       LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
+                       (unsigned int)LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
                        log_warn("unable to setusercontext %s: %s",
                                cfg->username, strerror(errno));
 #endif /* HAVE_SETUSERCONTEXT */
index d368fbe3a12d53c64e96eb0542e2a725ee7f0065..74f4c9328bbd95385c45f536db701746b698bbea 100644 (file)
@@ -42,6 +42,9 @@
  */
 
 #include "config.h"
+
+#ifdef CLIENT_SUBNET /* keeps splint happy */
+
 #include "edns-subnet/edns-subnet.h"
 #include "util/regional.h"
 #include "util/log.h"
@@ -144,3 +147,5 @@ upstream_get_mem(struct ednssubnet_upstream* upstream)
        if(!upstream) return 0;
        return sizeof(*upstream) + regional_get_mem(upstream->region);
 }
+
+#endif /* CLIENT_SUBNET */
index 2078da7ac5072712354e7ea7d3c0f83742745dc6..f6ab787c5e71d153817b43f896d333611805d42d 100644 (file)
@@ -4,6 +4,9 @@
  */
 
 #include "config.h"
+
+#ifdef CLIENT_SUBNET /* keeps splint happy */
+
 #include <ldns/ldns.h>
 
 #include "edns-subnet/subnetmod.h"
@@ -219,3 +222,5 @@ struct module_func_block* subnetmod_get_funcblock(void)
 {
        return &subnetmod_block;
 }
+
+#endif  /* CLIENT_SUBNET */
index e8ad53f925d510856cd835d9ac601474801698bf..0945b24b1cedd4f843b717fa31a0131037cc2696 100644 (file)
@@ -1230,6 +1230,8 @@ serviced_create(struct outside_network* outnet, ldns_buffer* buff, int dnssec,
 #endif
 #ifdef UNBOUND_DEBUG
        ins = 
+#else
+       (void)
 #endif
        rbtree_insert(outnet->serviced, &sq->node);
        log_assert(ins != NULL); /* must not be already present */
@@ -1475,6 +1477,8 @@ serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
        size_t backlen = 0;
 #ifdef UNBOUND_DEBUG
        rbnode_t* rem =
+#else
+       (void)
 #endif
        /* remove from tree, and schedule for deletion, so that callbacks
         * can safely deregister themselves and even create new serviced
@@ -1912,6 +1916,8 @@ void outnet_serviced_query_stop(struct serviced_query* sq, void* cb_arg)
        if(!sq->cblist && !sq->to_be_deleted) {
 #ifdef UNBOUND_DEBUG
                rbnode_t* rem =
+#else
+               (void)
 #endif
                rbtree_delete(sq->outnet->serviced, sq);
                log_assert(rem); /* should be present */
index 37521729baceaf713628ee8d68b2337abdfbfbef..ef0031c94316bb4c88242f7b67af40de303c828e 100644 (file)
@@ -1518,7 +1518,7 @@ xml_entitydeclhandler(void *userData,
        const XML_Char *ATTR_UNUSED(publicId),
        const XML_Char *ATTR_UNUSED(notationName))
 {
-       XML_StopParser((XML_Parser)userData, XML_FALSE);
+       (void)XML_StopParser((XML_Parser)userData, XML_FALSE);
 }
 
 /**
index 65e0ad2a57cb9c6c08db6946f6db0df2c86c87db..8195775d19abc383df610dc8adc9c553f1352e3b 100644 (file)
@@ -54,7 +54,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
 #endif
 
 /* random initial value */
-static uint32_t raninit = 0xdeadbeef;
+static uint32_t raninit = (uint32_t)0xdeadbeef;
 
 void
 hash_set_raninit(uint32_t v)
index eb137755c65087b89a98042fc3bc0107329a7260..23939f87a2176c25045b46bf16e7c1b4370ccfa4 100644 (file)
@@ -881,6 +881,8 @@ print_id(FILE* out, char* fname, struct module_env* env,
        ldns_buffer_clear(env->scratch_buffer);
 #ifdef UNBOUND_DEBUG
        s =
+#else
+       (void)
 #endif
        ldns_rdf2buffer_str_dname(env->scratch_buffer, &rdf);
        log_assert(s == LDNS_STATUS_OK);
index cc551f83320f48bddaa8feb8f696961375add533..c46e94215541f10d5bdd871c323e234a26c0cb11 100644 (file)
@@ -242,6 +242,8 @@ anchor_new_ta(struct val_anchors* anchors, uint8_t* name, int namelabs,
        }
 #ifdef UNBOUND_DEBUG
        r =
+#else
+       (void)
 #endif
        rbtree_insert(anchors->tree, &ta->node);
        if(lockit) {
index 2a2cfcf9b2d5c1a14831b49277d6d53e70b7c978..bb75aeb6f082a2231d2274e70de4484f99054685 100644 (file)
@@ -712,6 +712,8 @@ nsec3_hash_name(rbtree_t* table, struct regional* region, ldns_buffer* buf,
                return r;
 #ifdef UNBOUND_DEBUG
        n =
+#else
+       (void)
 #endif
        rbtree_insert(table, &c->node);
        log_assert(n); /* cannot be duplicate, just did lookup */