mirror of
https://github.com/curl/curl.git
synced 2026-04-15 03:51:41 +03:00
vtls: avoid forward declaration in MultiSSL builds
The MSVC compiler cannot have forward declaration with const and static variable, causing this error: ``` curl\lib\vtls\vtls.c(417,44): warning C4132: 'Curl_ssl_multi': const object should be initialized ``` Ref: #14276 Closes #14305
This commit is contained in:
parent
8153b8e580
commit
98da147b18
1 changed files with 13 additions and 17 deletions
|
|
@ -413,23 +413,6 @@ int Curl_ssl_init(void)
|
|||
return Curl_ssl->init();
|
||||
}
|
||||
|
||||
#if defined(CURL_WITH_MULTI_SSL)
|
||||
static const struct Curl_ssl Curl_ssl_multi;
|
||||
#endif
|
||||
|
||||
/* Global cleanup */
|
||||
void Curl_ssl_cleanup(void)
|
||||
{
|
||||
if(init_ssl) {
|
||||
/* only cleanup if we did a previous init */
|
||||
Curl_ssl->cleanup();
|
||||
#if defined(CURL_WITH_MULTI_SSL)
|
||||
Curl_ssl = &Curl_ssl_multi;
|
||||
#endif
|
||||
init_ssl = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static bool ssl_prefs_check(struct Curl_easy *data)
|
||||
{
|
||||
/* check for CURLOPT_SSLVERSION invalid parameter value */
|
||||
|
|
@ -1404,6 +1387,19 @@ static const struct Curl_ssl *available_backends[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
/* Global cleanup */
|
||||
void Curl_ssl_cleanup(void)
|
||||
{
|
||||
if(init_ssl) {
|
||||
/* only cleanup if we did a previous init */
|
||||
Curl_ssl->cleanup();
|
||||
#if defined(CURL_WITH_MULTI_SSL)
|
||||
Curl_ssl = &Curl_ssl_multi;
|
||||
#endif
|
||||
init_ssl = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static size_t multissl_version(char *buffer, size_t size)
|
||||
{
|
||||
static const struct Curl_ssl *selected;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue