From 28c92a12fa812c862a42734e47bb4d5075810b38 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 22 May 2024 13:11:09 +0200 Subject: uefi: move variables Fixes "unused variable" warnings with OPENSSL_SYS_UEFI. Signed-off-by: Gerd Hoffmann Reviewed-by: Matt Caswell Reviewed-by: Todd Short Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24459) (cherry picked from commit 7bc10f6ce2f91714d39a0410bfc545d79913e343) --- crypto/params.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/params.c b/crypto/params.c index 0baf3fc174..c109cabd42 100644 --- a/crypto/params.c +++ b/crypto/params.c @@ -469,9 +469,6 @@ int OSSL_PARAM_get_int32(const OSSL_PARAM *p, int32_t *val) int OSSL_PARAM_set_int32(OSSL_PARAM *p, int32_t val) { - uint32_t u32; - unsigned int shift; - if (p == NULL) { err_null_argument; return 0; @@ -511,6 +508,9 @@ int OSSL_PARAM_set_int32(OSSL_PARAM *p, int32_t val) return general_set_int(p, &val, sizeof(val)); } else if (p->data_type == OSSL_PARAM_REAL) { #ifndef OPENSSL_SYS_UEFI + uint32_t u32; + unsigned int shift; + p->return_size = sizeof(double); if (p->data == NULL) return 1; @@ -624,8 +624,6 @@ int OSSL_PARAM_get_uint32(const OSSL_PARAM *p, uint32_t *val) int OSSL_PARAM_set_uint32(OSSL_PARAM *p, uint32_t val) { - unsigned int shift; - if (p == NULL) { err_null_argument; return 0; @@ -670,6 +668,8 @@ int OSSL_PARAM_set_uint32(OSSL_PARAM *p, uint32_t val) return general_set_uint(p, &val, sizeof(val)); } else if (p->data_type == OSSL_PARAM_REAL) { #ifndef OPENSSL_SYS_UEFI + unsigned int shift; + p->return_size = sizeof(double); if (p->data == NULL) return 1; -- cgit v1.2.3