aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-03-20 17:51:06 +0000
committerSteve Holme <steve_holme@hotmail.com>2016-03-20 17:51:06 +0000
commit935138374516ef723a00bd7327e1f0d2653dcb9d (patch)
treeeab460f8fb50ab6c7248b89c1c913a06122a8d21 /lib/connect.c
parent89f397d7eb04c1baa7f3e04fcf7128ff1b5c7f2a (diff)
connect/ntlm/http: Fixed compilation warnings when verbose strings disabled
warning C4189: 'data': local variable is initialized but not referenced
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 4ad4ec403..567186a69 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -859,8 +859,10 @@ CURLcode Curl_is_connected(struct connectdata *conn,
void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd)
{
-#ifdef TCP_NODELAY
- struct SessionHandle *data= conn->data;
+#if defined(TCP_NODELAY)
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
+ struct SessionHandle *data = conn->data;
+#endif
curl_socklen_t onoff = (curl_socklen_t) 1;
int level = IPPROTO_TCP;
@@ -877,6 +879,10 @@ void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd)
level = pe->p_proto;
#endif
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
+ (void) conn;
+#endif
+
if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff,
sizeof(onoff)) < 0)
infof(data, "Could not set TCP_NODELAY: %s\n",