]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove dead stores reported by scan-build
authorMichal Nowak <mnowak@isc.org>
Mon, 22 Jun 2026 19:24:33 +0000 (21:24 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 23 Jul 2026 12:22:12 +0000 (14:22 +0200)
The syncplugin test driver overwrote two dns_name_fromstring() results
without checking them; wrap the calls in CHECK():

    bin/tests/system/hooks/driver/test-syncplugin.c:156:3: warning: Value stored to 'result' is never read [deadcode.DeadStores]
    bin/tests/system/hooks/driver/test-syncplugin.c:158:3: warning: Value stored to 'result' is never read [deadcode.DeadStores]

Assisted-by: Claude:claude-opus-4-8
bin/tests/system/hooks/driver/test-syncplugin.c

index ef85ef4b8332f292cda452bcfebacc24a88dcc1e..07aa95861eca25886a6a6256134b4ebcea2f59bc 100644 (file)
@@ -154,12 +154,12 @@ plugin_register(const char *parameters, const void *cfg, const char *cfgfile,
                        goto cleanup;
                }
 
-               result = dns_name_fromstring(&example2com, "example2.com.",
-                                            NULL, 0, isc_g_mctx);
-               result = dns_name_fromstring(&example3com, "example3.com.",
-                                            NULL, 0, isc_g_mctx);
-               result = dns_name_fromstring(&example4com, "example4.com.",
-                                            NULL, 0, isc_g_mctx);
+               CHECK(dns_name_fromstring(&example2com, "example2.com.", NULL,
+                                         0, isc_g_mctx));
+               CHECK(dns_name_fromstring(&example3com, "example3.com.", NULL,
+                                         0, isc_g_mctx));
+               CHECK(dns_name_fromstring(&example4com, "example4.com.", NULL,
+                                         0, isc_g_mctx));
 
                if (!dns_name_equal(ctx->origin, &example2com) &&
                    !dns_name_equal(ctx->origin, &example3com) &&