]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix compiling error on arm
authorFangming.Fang <fangming.fang@arm.com>
Thu, 25 Feb 2021 08:21:56 +0000 (08:21 +0000)
committerPauli <ppzgs1@gmail.com>
Tue, 2 Mar 2021 11:25:00 +0000 (21:25 +1000)
Fixes #14313

Change-Id: I0dc9dd475a1ed1331738355fbbec0c51fbcb37f1

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

test/p_test.c

index 57597086aa9ce57eef5dd2b1648bbf3c259642f8..02a822c486159b3b696fe64ae4d7ddd43ab9c18a 100644 (file)
@@ -115,11 +115,15 @@ static int p_get_params(void *provctx, OSSL_PARAM params[])
 }
 
 static void p_set_error(int lib, int reason, const char *file, int line,
-                        const char *func)
+                        const char *func, const char *fmt, ...)
 {
+    va_list ap;
+
+    va_start(ap, fmt);
     c_new_error(NULL);
     c_set_error_debug(NULL, file, line, func);
-    c_vset_error(NULL, ERR_PACK(lib, 0, reason), NULL, NULL);
+    c_vset_error(NULL, ERR_PACK(lib, 0, reason), fmt, ap);
+    va_end(ap);
 }
 
 static const OSSL_ITEM *p_get_reason_strings(void *_)
@@ -192,7 +196,7 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
      * Set a spurious error to check error handling works correctly. This will
      * be ignored
      */
-    p_set_error(ERR_LIB_PROV, 1, ctx->thisfile, OPENSSL_LINE, ctx->thisfunc);
+    p_set_error(ERR_LIB_PROV, 1, ctx->thisfile, OPENSSL_LINE, ctx->thisfunc, NULL);
 
     *provctx = (void *)ctx;
     *out = p_test_table;