From: Richard Levitte Date: Fri, 23 Mar 2018 13:18:16 +0000 (+0100) Subject: test/shlibloadtest.c: make some variables block local X-Git-Tag: OpenSSL_1_1_1-pre4~62 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=84e68a1bbaa98889cc6c20e9f35f0f96148d9642;p=oweals%2Fopenssl.git test/shlibloadtest.c: make some variables block local myDSO_dsobyaddr and myDSO_free are only used in a narrow block of code, and can therefore be made local to that block. Otherwise, some compilers may warn that they are unused. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5733) --- diff --git a/test/shlibloadtest.c b/test/shlibloadtest.c index 07ed40dc6f..a8cf8e7fde 100644 --- a/test/shlibloadtest.c +++ b/test/shlibloadtest.c @@ -108,8 +108,6 @@ static int test_lib(void) SSL_CTX_free_t mySSL_CTX_free; ERR_get_error_t myERR_get_error; OpenSSL_version_num_t myOpenSSL_version_num; - DSO_dsobyaddr_t myDSO_dsobyaddr; - DSO_free_t myDSO_free; int result = 0; switch (test_type) { @@ -171,6 +169,9 @@ static int test_lib(void) if (test_type == DSO_REFTEST) { # ifdef DSO_DLFCN + DSO_dsobyaddr_t myDSO_dsobyaddr; + DSO_free_t myDSO_free; + /* * This is resembling the code used in ossl_init_base() and * OPENSSL_atexit() to block unloading the library after dlclose().