From: Matthijs Mekking Date: Mon, 22 Jun 2026 12:45:54 +0000 (+0200) Subject: Remove dead code warnings found by scan-build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77754dad29a2d04176752597280d43bc7df8a742;p=thirdparty%2Fbind9.git Remove dead code warnings found by scan-build Small cleanup, fixing the dead code issues found by scan-build. Patch submitted by Tim Rühsen. --- diff --git a/bin/plugins/synthrecord.c b/bin/plugins/synthrecord.c index f586d3f9e07..1825f584520 100644 --- a/bin/plugins/synthrecord.c +++ b/bin/plugins/synthrecord.c @@ -610,7 +610,6 @@ plugin_register(const char *parameters, const void *cfg, const char *cfgfile, *instp = inst; isc_mem_attach(mctx, &inst->mctx); - result = ISC_R_SUCCESS; result = synthrecord_parseconfig(inst, parameters, cfg, cfgfile, cfgline, aclctx, ctx->origin); diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index be6b29a5ffb..3e10884af01 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -2534,7 +2534,6 @@ getsigningtime(dns_db_t *db, isc_stdtime_t *resign, dns_name_t *foundname, UNLOCK(&qpdb->heap->lock); return ISC_R_NOTFOUND; } - header = elem->header; nlock = qpzone_get_lock(elem->node); UNLOCK(&qpdb->heap->lock); @@ -4036,7 +4035,7 @@ qpzone_detachnode(dns_dbnode_t **nodep DNS__DB_FLARG) { static unsigned int nodecount(dns_db_t *db) { - qpzonedb_t *qpdb = qpdb = (qpzonedb_t *)db; + qpzonedb_t *qpdb = (qpzonedb_t *)db; dns_qp_memusage_t mu; REQUIRE(VALID_QPZONE(qpdb)); diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index 951b2f26942..0a7b03ae052 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.c @@ -211,8 +211,8 @@ makeslab(dns_rdataset_t *rdataset, isc_mem_t *mctx, isc_region_t *region, if (rdataset->type != 0) { return ISC_R_FAILURE; } - rawbuf = newslab(rdataset, mctx, region, 0, buflen, func, file, - line); + (void *)newslab(rdataset, mctx, region, 0, buflen, func, file, + line); return ISC_R_SUCCESS; } diff --git a/lib/isc/ossl_wrap/ossl3.c b/lib/isc/ossl_wrap/ossl3.c index f486b5c70d0..647ad96c00b 100644 --- a/lib/isc/ossl_wrap/ossl3.c +++ b/lib/isc/ossl_wrap/ossl3.c @@ -730,8 +730,6 @@ isc_ossl_wrap_load_rsa_public_from_components(isc_ossl_wrap_rsa_components_t *c, OSSL_PARAM *params = NULL; isc_result_t result; - result = ISC_R_SUCCESS; - REQUIRE(pkeyp != NULL && *pkeyp == NULL); REQUIRE(c != NULL && c->n != NULL && c->e != NULL); diff --git a/lib/isccfg/kaspconf.c b/lib/isccfg/kaspconf.c index ab4df8a51d5..7f26263972b 100644 --- a/lib/isccfg/kaspconf.c +++ b/lib/isccfg/kaspconf.c @@ -883,7 +883,6 @@ cfg_kasp_builtinconfig(isc_mem_t *mctx, const char *name, if (result != ISC_R_NOTFOUND) { return result; } - result = ISC_R_SUCCESS; /* No kasp with configured name was found in list, create new one. */ INSIST(kasp == NULL);