From d7d8e2c894e242f7e4d25f986c5ff15758853b67 Mon Sep 17 00:00:00 2001 From: "Fangming.Fang" Date: Thu, 25 Feb 2021 08:21:56 +0000 Subject: [PATCH] Fix compiling error on arm Fixes #14313 Change-Id: I0dc9dd475a1ed1331738355fbbec0c51fbcb37f1 Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14346) --- test/p_test.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/p_test.c b/test/p_test.c index 57597086aa9..02a822c4861 100644 --- a/test/p_test.c +++ b/test/p_test.c @@ -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; -- 2.47.3