]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS
authorSergey Markelov <sergey@solidstatenetworks.com>
Sun, 11 Jul 2021 21:06:38 +0000 (14:06 -0700)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 16 Jul 2021 17:55:52 +0000 (13:55 -0400)
fix compiler warnings about unused variables and parameters when
built with --disable-verbose.

Closes https://github.com/curl/curl/pull/7377

lib/connect.c
lib/vauth/digest_sspi.c
lib/vauth/krb5_sspi.c
lib/vauth/ntlm_sspi.c

index 91d68e2166cac95e75290c459d7b82a648a29e69..b8fde5580d60cf86f858fa5ff13c6a6bf404e4cf 100644 (file)
@@ -1092,9 +1092,11 @@ static void nosigpipe(struct Curl_easy *data,
   int onoff = 1;
   if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff,
                 sizeof(onoff)) < 0) {
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
     char buffer[STRERROR_LEN];
     infof(data, "Could not set SO_NOSIGPIPE: %s",
           Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
+#endif
   }
 }
 #else
index 53c4df08ae21fa973abfd90d79636d63090a641a..94f8f8c0dff78d2cd5c9e470237395ae3fae8504 100644 (file)
@@ -197,7 +197,9 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
      status == SEC_I_COMPLETE_AND_CONTINUE)
     s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
   else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
     char buffer[STRERROR_LEN];
+#endif
 
     s_pSecFn->FreeCredentialsHandle(&credentials);
     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)
       s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
     else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
       char buffer[STRERROR_LEN];
+#endif
 
       s_pSecFn->FreeCredentialsHandle(&credentials);
 
index 6899570f86f0f6a6066fdc6fdbfbd7216bc2a65a..8f7a2b02de76ec9ca5029dd9716d6d550065dfb5 100644 (file)
@@ -270,6 +270,10 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
   SECURITY_STATUS status;
   char *user_name;
 
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
+  (void) data;
+#endif
+
   /* Ensure we have a valid challenge message */
   if(!Curl_bufref_len(chlg)) {
     infof(data, "GSSAPI handshake failure (empty security message)");
index b078c824927711418c7b7006562d0aac2670daaa..3e39dad315fda3d48f78cbc1e5f458580f971fad 100644 (file)
@@ -253,6 +253,9 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
   unsigned long attrs;
   TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
 
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
+  (void) data;
+#endif
   (void) passwdp;
   (void) userp;