]> granicus.if.org Git - curl/commitdiff
curl_sasl: fix unused-variable warning
authorMarcel Raad <raad@teamviewer.com>
Sat, 3 Jun 2017 09:59:38 +0000 (11:59 +0200)
committerMarcel Raad <raad@teamviewer.com>
Sat, 3 Jun 2017 09:59:38 +0000 (11:59 +0200)
This fixes the following warning with CURL_DISABLE_CRYPTO_AUTH,
as seen in the autobuilds:

curl_sasl.c:417:9: warning: unused variable 'serverdata'
[-Wunused-variable]

lib/curl_sasl.c

index 025b5dbe323c26cd8cc1fb54332995e66e164529..bd574b5e2a42aad30e6b43dd9c50eddc2014c7f0 100644 (file)
@@ -414,7 +414,6 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
   const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
     conn->host.name;
   const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
-  char *serverdata;
 #if !defined(CURL_DISABLE_CRYPTO_AUTH)
   char *chlg = NULL;
   size_t chlglen = 0;
@@ -423,6 +422,10 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
   const char *service = data->set.str[STRING_SERVICE_NAME] ?
                         data->set.str[STRING_SERVICE_NAME] :
                         sasl->params->service;
+#endif
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
+    defined(USE_NTLM)
+  char *serverdata;
 #endif
   size_t len = 0;