1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

mbedtls: fix variable shadow warning

vtls/mbedtls.c:804:69: warning: declaration of 'entropy' shadows a global declaration [-Wshadow]
 CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy,
                                                                     ^~~~~~~
This commit is contained in:
Jay Satiro 2017-05-29 17:38:33 -04:00
parent 3558e14967
commit 35e9281ef8

View File

@ -67,7 +67,7 @@
#endif #endif
#if defined(THREADING_SUPPORT) #if defined(THREADING_SUPPORT)
static mbedtls_entropy_context entropy; static mbedtls_entropy_context ts_entropy;
static int entropy_init_initialized = 0; static int entropy_init_initialized = 0;
@ -247,11 +247,11 @@ mbed_connect_step1(struct connectdata *conn,
} }
#ifdef THREADING_SUPPORT #ifdef THREADING_SUPPORT
entropy_init_mutex(&entropy); entropy_init_mutex(&ts_entropy);
mbedtls_ctr_drbg_init(&connssl->ctr_drbg); mbedtls_ctr_drbg_init(&connssl->ctr_drbg);
ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, entropy_func_mutex, ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, entropy_func_mutex,
&entropy, NULL, 0); &ts_entropy, NULL, 0);
if(ret) { if(ret) {
#ifdef MBEDTLS_ERROR_C #ifdef MBEDTLS_ERROR_C
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));