]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Annotate ifs that placate gcc but rile coverity (CID #1504005) (#4681)
authorJames Jones <jejones3141@gmail.com>
Wed, 17 Aug 2022 18:00:14 +0000 (13:00 -0500)
committerGitHub <noreply@github.com>
Wed, 17 Aug 2022 18:00:14 +0000 (14:00 -0400)
unlang_function_clear() has the warn_unused_result attribute,
hence the seemingly pointless if statements about which
coverity complains. Annotation should silence coverity.

src/lib/tls/session.c

index 29b1e2a227367f15401d44663caa97877ae25030..0921be31893c9f79278472860e6bd7bf75cc78a1 100644 (file)
@@ -1448,6 +1448,7 @@ DIAG_ON(DIAG_UNKNOWN_PRAGMAS)
                ua = fr_tls_cache_pending_push(request, tls_session);
                switch (ua) {
                case UNLANG_ACTION_FAIL:
+                       /* coverity[identical_branches] */
                        if (unlang_function_clear(request) < 0) goto error;
                        goto error;
 
@@ -1465,6 +1466,7 @@ DIAG_ON(DIAG_UNKNOWN_PRAGMAS)
                ua = fr_tls_verify_cert_pending_push(request, tls_session);
                switch (ua) {
                case UNLANG_ACTION_FAIL:
+                       /* coverity[identical_branches] */
                        if (unlang_function_clear(request) < 0) goto error;
                        goto error;