Commit 61f53062 authored by Mark Andrews's avatar Mark Andrews

Merge branch '801-silence-coverity-issues' into 'master'

Resolve "Silence Coverity Issues"

Closes #801

See merge request !1285
parents 67fbbc4e bd529b1f
Pipeline #8632 passed with stages
in 7 minutes and 37 seconds
5131. [cleanup] Address Coverity warnings. [GL #801]
5130. [cleanup] Remove support for l10n message catalogs. [GL #709]
5129. [contrib] sdlz_helper.c:build_querylist was not properly
......
......@@ -9381,7 +9381,7 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
isc_refcount_increment(&zl->refs);
result = dns_view_asyncload(view, reconfig, view_loaded, zl);
if (result != ISC_R_SUCCESS) {
isc_refcount_decrement(&zl->refs);
(void)isc_refcount_decrement(&zl->refs);
goto cleanup;
}
}
......
......@@ -592,8 +592,9 @@ process_name(query_ctx_t *qctx, filter_aaaa_t mode, const dns_name_t *name,
CHECK(dns_message_findtype(name, dns_rdatatype_a, 0, NULL));
}
dns_message_findtype(name, type, 0, &rdataset);
dns_message_findtype(name, dns_rdatatype_rrsig, type, &sigrdataset);
(void)dns_message_findtype(name, type, 0, &rdataset);
(void)dns_message_findtype(name, dns_rdatatype_rrsig, type,
&sigrdataset);
if (rdataset != NULL &&
(sigrdataset == NULL || !WANTDNSSEC(qctx->client) ||
......
......@@ -1920,6 +1920,7 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
rbtdb_nodelock_t *nodelock;
int bucket = node->locknum;
bool no_reference = true;
uint_fast32_t refs;
nodelock = &rbtdb->node_locks[bucket];
......@@ -1930,7 +1931,8 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
/* Handle easy and typical case first. */
if (!node->dirty && KEEP_NODE(node, rbtdb)) {
if (isc_refcount_decrement(&node->references) == 1) {
isc_refcount_decrement(&nodelock->references);
refs = isc_refcount_decrement(&nodelock->references);
INSIST(refs > 0);
return (true);
} else {
return (false);
......@@ -1991,7 +1993,8 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
} else
write_locked = true;
INSIST(isc_refcount_decrement(&nodelock->references) > 0);
refs = isc_refcount_decrement(&nodelock->references);
INSIST(refs > 0);
if (KEEP_NODE(node, rbtdb))
goto restore_locks;
......
......@@ -3177,7 +3177,7 @@ process_fd(isc__socketthread_t *thread, int fd, bool readable,
/*
* Sock is being closed, it will be destroyed, bail.
*/
isc_refcount_decrement(&sock->references);
(void)isc_refcount_decrement(&sock->references);
UNLOCK(&thread->fdlock[lockid]);
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment