From 74324a4120a44120556af41eb9480c5b2492d1fb Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 9 Feb 2024 17:38:45 +0100 Subject: [PATCH] linux: Explicitly initialize auto-cleanup variables gcc complains about potentially uninitialized variables. Signed-off-by: Tomas Bzatek --- src/nvme/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvme/linux.c b/src/nvme/linux.c index f0723193..e29d9e72 100644 --- a/src/nvme/linux.c +++ b/src/nvme/linux.c @@ -725,7 +725,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac, unsigned char *key) { const char hmac_seed[] = "NVMe-over-Fabrics"; - _cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx; + _cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx = NULL; const EVP_MD *md; ENGINE_load_builtin_engines(); @@ -881,7 +881,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac, { const char hmac_seed[] = "NVMe-over-Fabrics"; OSSL_PARAM params[2], *p = params; - _cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx; + _cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx = NULL; _cleanup_evp_mac_ctx_ EVP_MAC_CTX *mac_ctx = NULL; _cleanup_evp_mac_ EVP_MAC *mac = NULL; char *progq = NULL; -- 2.43.0