]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove dead code warnings found by scan-build
authorMatthijs Mekking <matthijs@isc.org>
Mon, 22 Jun 2026 12:45:54 +0000 (14:45 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 29 Jun 2026 10:00:17 +0000 (10:00 +0000)
Small cleanup, fixing the dead code issues found by scan-build.

Patch submitted by Tim Rühsen.

bin/plugins/synthrecord.c
lib/dns/qpzone.c
lib/dns/rdataslab.c
lib/isc/ossl_wrap/ossl3.c
lib/isccfg/kaspconf.c

index f586d3f9e07166b1a8a1baa865167c50832e70ab..1825f58452063e05e4f99626f5d1352cfee07c08 100644 (file)
@@ -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);
 
index be6b29a5ffbdd2d45334bd9939b1021d82e8bf75..3e10884af011fccfe7e1ed29048700742a3e8d93 100644 (file)
@@ -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));
index 951b2f269424c0d9dc70cb31309ca0dcefe8a149..0a7b03ae05239cf8a765e86f1aa5a1dda30dfe14 100644 (file)
@@ -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;
        }
 
index f486b5c70d095e5654fca88fe0e16a0fd50c3dcf..647ad96c00b7a0d6b661c7f11bf48d4df9b5809e 100644 (file)
@@ -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);
 
index ab4df8a51d510337217b516f89714f409abbef0e..7f26263972baf2ea949ce8fe16c74d76de3f6c82 100644 (file)
@@ -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);