aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-11-23 19:51:01 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-11-23 19:51:24 +0000
commit53e2e4c72100b2b47c9072d9af81d914b2c24373 (patch)
treee8e077f6be77077620eaeedea16bfe228c043402
parentdcc01123f24eda77695b17455373ba5c2b3b327d (diff)
multi.c: Fixed compilation warnings when no verbose string support
warning: variable 'connection_id' set but not used warning: unused parameter 'lineno'
-rw-r--r--lib/multi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 7ea366ca2..df413ace4 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -113,20 +113,23 @@ static void mstate(struct SessionHandle *data, CURLMstate state
#endif
)
{
-#ifdef DEBUGBUILD
- long connection_id = -5000;
-#endif
CURLMstate oldstate = data->mstate;
+#if defined(DEBUGBUILD) && defined(CURL_DISABLE_VERBOSE_STRINGS)
+ (void) lineno;
+#endif
+
if(oldstate == state)
/* don't bother when the new state is the same as the old state */
return;
data->mstate = state;
-#ifdef DEBUGBUILD
+#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
if(data->mstate >= CURLM_STATE_CONNECT_PEND &&
data->mstate < CURLM_STATE_COMPLETED) {
+ long connection_id = -5000;
+
if(data->easy_conn)
connection_id = data->easy_conn->connection_id;
@@ -136,6 +139,7 @@ static void mstate(struct SessionHandle *data, CURLMstate state
(void *)data, lineno, connection_id);
}
#endif
+
if(state == CURLM_STATE_COMPLETED)
/* changing to COMPLETED means there's one less easy handle 'alive' */
data->multi->num_alive--;