mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS
fix compiler warnings about unused variables and parameters when built with --disable-verbose. Closes https://github.com/curl/curl/pull/7377
This commit is contained in:
parent
af1ee130f8
commit
e919848ead
@ -1092,9 +1092,11 @@ static void nosigpipe(struct Curl_easy *data,
|
|||||||
int onoff = 1;
|
int onoff = 1;
|
||||||
if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff,
|
if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff,
|
||||||
sizeof(onoff)) < 0) {
|
sizeof(onoff)) < 0) {
|
||||||
|
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
char buffer[STRERROR_LEN];
|
char buffer[STRERROR_LEN];
|
||||||
infof(data, "Could not set SO_NOSIGPIPE: %s",
|
infof(data, "Could not set SO_NOSIGPIPE: %s",
|
||||||
Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
|
Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -197,7 +197,9 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
|
|||||||
status == SEC_I_COMPLETE_AND_CONTINUE)
|
status == SEC_I_COMPLETE_AND_CONTINUE)
|
||||||
s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
|
s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
|
||||||
else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
|
else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
|
||||||
|
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
char buffer[STRERROR_LEN];
|
char buffer[STRERROR_LEN];
|
||||||
|
#endif
|
||||||
|
|
||||||
s_pSecFn->FreeCredentialsHandle(&credentials);
|
s_pSecFn->FreeCredentialsHandle(&credentials);
|
||||||
Curl_sspi_free_identity(p_identity);
|
Curl_sspi_free_identity(p_identity);
|
||||||
@ -585,7 +587,9 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
|
|||||||
status == SEC_I_COMPLETE_AND_CONTINUE)
|
status == SEC_I_COMPLETE_AND_CONTINUE)
|
||||||
s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
|
s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
|
||||||
else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
|
else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
|
||||||
|
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
char buffer[STRERROR_LEN];
|
char buffer[STRERROR_LEN];
|
||||||
|
#endif
|
||||||
|
|
||||||
s_pSecFn->FreeCredentialsHandle(&credentials);
|
s_pSecFn->FreeCredentialsHandle(&credentials);
|
||||||
|
|
||||||
|
@ -270,6 +270,10 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
|
|||||||
SECURITY_STATUS status;
|
SECURITY_STATUS status;
|
||||||
char *user_name;
|
char *user_name;
|
||||||
|
|
||||||
|
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
|
(void) data;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Ensure we have a valid challenge message */
|
/* Ensure we have a valid challenge message */
|
||||||
if(!Curl_bufref_len(chlg)) {
|
if(!Curl_bufref_len(chlg)) {
|
||||||
infof(data, "GSSAPI handshake failure (empty security message)");
|
infof(data, "GSSAPI handshake failure (empty security message)");
|
||||||
|
@ -253,6 +253,9 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||||||
unsigned long attrs;
|
unsigned long attrs;
|
||||||
TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
|
TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
|
||||||
|
|
||||||
|
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
|
(void) data;
|
||||||
|
#endif
|
||||||
(void) passwdp;
|
(void) passwdp;
|
||||||
(void) userp;
|
(void) userp;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user