From: Yuri Schaeffer Date: Mon, 21 Jan 2013 15:42:21 +0000 (+0000) Subject: more lint happiness X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22175f561d6c5e57cffe77123a7b9a82ef7359e3;p=thirdparty%2Funbound.git more lint happiness git-svn-id: file:///svn/unbound/branches/edns-subnet@2818 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/unbound.c b/daemon/unbound.c index 377396fc4..87679a088 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -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 */ diff --git a/edns-subnet/edns-subnet.c b/edns-subnet/edns-subnet.c index d368fbe3a..74f4c9328 100644 --- a/edns-subnet/edns-subnet.c +++ b/edns-subnet/edns-subnet.c @@ -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 */ diff --git a/edns-subnet/subnetmod.c b/edns-subnet/subnetmod.c index 2078da7ac..f6ab787c5 100644 --- a/edns-subnet/subnetmod.c +++ b/edns-subnet/subnetmod.c @@ -4,6 +4,9 @@ */ #include "config.h" + +#ifdef CLIENT_SUBNET /* keeps splint happy */ + #include #include "edns-subnet/subnetmod.h" @@ -219,3 +222,5 @@ struct module_func_block* subnetmod_get_funcblock(void) { return &subnetmod_block; } + +#endif /* CLIENT_SUBNET */ diff --git a/services/outside_network.c b/services/outside_network.c index e8ad53f92..0945b24b1 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -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 */ diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index 37521729b..ef0031c94 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -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); } /** diff --git a/util/storage/lookup3.c b/util/storage/lookup3.c index 65e0ad2a5..8195775d1 100644 --- a/util/storage/lookup3.c +++ b/util/storage/lookup3.c @@ -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) diff --git a/validator/autotrust.c b/validator/autotrust.c index eb137755c..23939f87a 100644 --- a/validator/autotrust.c +++ b/validator/autotrust.c @@ -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); diff --git a/validator/val_anchor.c b/validator/val_anchor.c index cc551f833..c46e94215 100644 --- a/validator/val_anchor.c +++ b/validator/val_anchor.c @@ -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) { diff --git a/validator/val_nsec3.c b/validator/val_nsec3.c index 2a2cfcf9b..bb75aeb6f 100644 --- a/validator/val_nsec3.c +++ b/validator/val_nsec3.c @@ -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 */