]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-sasl: test-sasl-authentication - Avoid scan-build dead code complaint
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Oct 2025 09:40:50 +0000 (12:40 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Oct 2025 15:27:29 +0000 (15:27 +0000)
It wasn't really dead code, but test_assert() was marked as ATTR_NORETURN
to static analyzer builds, so it looked like that. However, we can simply
remove this check since test_assert(FALSE) causes the later
failed || test_has_failed() check to match anyway.

src/lib-sasl/test-sasl-authentication.c

index e25e32b4300c9b9b8fb8ebda57f599b76db886c8..4af3e44132a555d5f54c6a3bfc299a6ce3d39648 100644 (file)
@@ -283,7 +283,6 @@ test_server_request_output(struct sasl_server_req_ctx *rctx,
        switch (output->status) {
        case SASL_SERVER_OUTPUT_INTERNAL_FAILURE:
                e_debug(test_event, "Internal failure");
-               failed = TRUE;
                test_assert(FALSE);
                tctx->finished = TRUE;
                break;