From: James Jones Date: Wed, 17 Aug 2022 18:00:14 +0000 (-0500) Subject: Annotate ifs that placate gcc but rile coverity (CID #1504005) (#4681) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d33f33747f85851ed2c3af928a94071910f1f5e;p=thirdparty%2Ffreeradius-server.git Annotate ifs that placate gcc but rile coverity (CID #1504005) (#4681) unlang_function_clear() has the warn_unused_result attribute, hence the seemingly pointless if statements about which coverity complains. Annotation should silence coverity. --- diff --git a/src/lib/tls/session.c b/src/lib/tls/session.c index 29b1e2a2273..0921be31893 100644 --- a/src/lib/tls/session.c +++ b/src/lib/tls/session.c @@ -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;