schannel: fix compiler warnings
When UNICODE is not defined, the Curl_convert_UTF8_to_tchar macro maps directly to its argument. As it is declared as a pointer to const and InitializeSecurityContext expects a pointer to non-const, both MSVC and MinGW issue a warning about implicitly casting away the const. Fix this by declaring the variables as pointers to non-const. Closes https://github.com/curl/curl/pull/1394
This commit is contained in:
parent
1f152a42ae
commit
33ca733ee2
@ -159,7 +159,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
|
|||||||
#endif
|
#endif
|
||||||
TCHAR *host_name;
|
TCHAR *host_name;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||||
conn->host.name;
|
conn->host.name;
|
||||||
|
|
||||||
infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
|
infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
|
||||||
@ -456,7 +456,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
|
|||||||
TCHAR *host_name;
|
TCHAR *host_name;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
bool doread;
|
bool doread;
|
||||||
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||||
conn->host.name;
|
conn->host.name;
|
||||||
|
|
||||||
doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE;
|
doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE;
|
||||||
@ -1434,7 +1434,7 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
|
|||||||
*/
|
*/
|
||||||
struct Curl_easy *data = conn->data;
|
struct Curl_easy *data = conn->data;
|
||||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||||
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||||
conn->host.name;
|
conn->host.name;
|
||||||
|
|
||||||
infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n",
|
infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user