]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
core_get_libctx: use assert() instead of ossl_assert()
authorTomas Mraz <tomas@openssl.org>
Tue, 16 Mar 2021 11:19:38 +0000 (12:19 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 16 Mar 2021 12:15:18 +0000 (13:15 +0100)
Using ossl_assert makes the build fail with --strict-warnings
because the ossl_assert is declared with warn_unused_result.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14571)

crypto/provider_core.c

index 64bed25e047260f48f79c06779d2da3549894033..cd295809be4b875533f21614b55bd6a12a213d13 100644 (file)
@@ -7,6 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include <assert.h>
 #include <openssl/core.h>
 #include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
@@ -1118,7 +1119,7 @@ static OPENSSL_CORE_CTX *core_get_libctx(const OSSL_CORE_HANDLE *handle)
      * that does not apply here. Here |prov| == NULL can happen only in
      * case of a coding error.
      */
-    (void)ossl_assert(prov != NULL);
+    assert(prov != NULL);
     return (OPENSSL_CORE_CTX *)prov->libctx;
 }