Browse Source

core_get_libctx: use assert() instead of ossl_assert()

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)
Tomas Mraz 3 years ago
parent
commit
2217d4c9cc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      crypto/provider_core.c

+ 2 - 1
crypto/provider_core.c

@@ -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;
 }