]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- review fixes from Willem.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Aug 2013 14:10:29 +0000 (14:10 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Aug 2013 14:10:29 +0000 (14:10 +0000)
git-svn-id: file:///svn/unbound/trunk@2945 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/unbound.c
doc/Changelog
services/mesh.c
services/outside_network.c
util/storage/lookup3.c
validator/autotrust.c
validator/val_anchor.c
validator/val_nsec3.c

index dec337c02a842b4c02f8c228aa0ade03936a9a8b..28ea17355bf1073b84e28a55a7fc8b769c5f64cb 100644 (file)
@@ -521,7 +521,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
                /* setusercontext does initgroups, setuid, setgid, and
                 * also resource limits from login config, but we
                 * still call setresuid, setresgid to be sure to set all uid*/
-               if(setusercontext(NULL, pwd, uid,
+               if(setusercontext(NULL, pwd, uid, (unsigned)
                        LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
                        log_warn("unable to setusercontext %s: %s",
                                cfg->username, strerror(errno));
index 4227e44acfbe09717650ec1772c679cf970576e9..4d75e0377f252bda7f09142b9f07ef91bd2843d6 100644 (file)
@@ -1,5 +1,6 @@
 22 Aug 2013: Wouter
        - more fixes that I overlooked.
+       - review fixes from Willem.
 
 21 Aug 2013: Wouter
        - Fix#520: Errors found by static analysis from Tomas Hozza(redhat).
index d6249f9c50e93d8d416c5fe107435dd81febeb26..a8cb115ab935f9d74f5b46aebdaa3f90f9b2c049 100644 (file)
@@ -321,6 +321,8 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
                }
 #ifdef UNBOUND_DEBUG
                n =
+#else
+               (void)
 #endif
                rbtree_insert(&mesh->all, &s->node);
                log_assert(n != NULL);
@@ -390,6 +392,8 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
                }
 #ifdef UNBOUND_DEBUG
                n =
+#else
+               (void)
 #endif
                rbtree_insert(&mesh->all, &s->node);
                log_assert(n != NULL);
@@ -450,6 +454,8 @@ void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
        }
 #ifdef UNBOUND_DEBUG
        n =
+#else
+       (void)
 #endif
        rbtree_insert(&mesh->all, &s->node);
        log_assert(n != NULL);
@@ -657,6 +663,8 @@ void mesh_detach_subs(struct module_qstate* qstate)
        RBTREE_FOR(ref, struct mesh_state_ref*, &qstate->mesh_info->sub_set) {
 #ifdef UNBOUND_DEBUG
                n =
+#else
+               (void)
 #endif
                rbtree_delete(&ref->s->super_set, &lookup);
                log_assert(n != NULL); /* must have been present */
@@ -693,6 +701,8 @@ int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
                }
 #ifdef UNBOUND_DEBUG
                n =
+#else
+               (void)
 #endif
                rbtree_insert(&mesh->all, &sub->node);
                log_assert(n != NULL);
@@ -701,6 +711,8 @@ int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
                /* set new query state to run */
 #ifdef UNBOUND_DEBUG
                n =
+#else
+               (void)
 #endif
                rbtree_insert(&mesh->run, &sub->run_node);
                log_assert(n != NULL);
@@ -749,6 +761,8 @@ int mesh_state_attachment(struct mesh_state* super, struct mesh_state* sub)
        }
 #ifdef UNBOUND_DEBUG
        n =
+#else
+       (void)
 #endif
        rbtree_insert(&super->sub_set, &subref->node);
        log_assert(n != NULL); /* we checked above if statement, the reverse
index b99a933aa101285f6d02fb3261be0bbbbef88229..373d8f3536882b0d44c2dbf93181be5a717d3f7b 100644 (file)
@@ -1210,6 +1210,8 @@ serviced_create(struct outside_network* outnet, ldns_buffer* buff, int dnssec,
        sq->to_be_deleted = 0;
 #ifdef UNBOUND_DEBUG
        ins = 
+#else
+       (void)
 #endif
        rbtree_insert(outnet->serviced, &sq->node);
        log_assert(ins != NULL); /* must not be already present */
@@ -1449,6 +1451,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
@@ -1866,6 +1870,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 3f8c8f3579fc8dce8c3b3f35961c1d959fb044a0..7596033bdee27d4fed52f734a7b3f0d01539f8a7 100644 (file)
@@ -64,7 +64,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 5c362ac11dd4dc4208ad01367a8743257a3f3e6e..362f57a85eb01da5b9f2829ad0c565792b4dbb35 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 36d3365a94b9b54a04db7ae74338c6eecbbfa278..e710f2f24083a8f88ed002f64a1c07dbb635a63f 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 4b48e7beed6024b56e1f5c2afa98e6ef28657f33..20580c0d755fc450ccb6290554eef3819f392fb6 100644 (file)
@@ -713,6 +713,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 */