aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-09-09 13:24:42 +0000
committerYang Tse <yangsita@gmail.com>2006-09-09 13:24:42 +0000
commitbb87b65f083fdace9301eea95376f62b108405a0 (patch)
treedc81e09a608eb33e291bf22d658df63bc35046f4
parentb0f6e7cee48365d6b0cc9b52eeb8c151f2d86814 (diff)
Compiler warning fix
-rw-r--r--lib/ftp.c6
-rw-r--r--lib/multi.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 562944c77..ed441412e 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -850,7 +850,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
return CURLE_FTP_PORT_FAILED;
}
- if (sslen > sizeof(ss))
+ if (sslen > (socklen_t)sizeof(ss))
sslen = sizeof(ss);
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf), NULL,
0, NIFLAGS);
@@ -918,7 +918,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
else
((struct sockaddr_in6 *)sa)->sin6_port =0;
- if (sslen > sizeof(ss))
+ if (sslen > (socklen_t)sizeof(ss))
sslen = sizeof(ss);
if(bind(portsock, (struct sockaddr *)sa, sslen)) {
@@ -1088,7 +1088,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
Curl_strerror(conn, Curl_sockerrno()) );
return CURLE_FTP_PORT_FAILED;
}
- if (sslen>sizeof(sa))
+ if (sslen > (socklen_t)sizeof(sa))
sslen = sizeof(sa);
sa_filled_in = TRUE; /* the sa struct is filled in */
diff --git a/lib/multi.c b/lib/multi.c
index 24931a1b6..afbf271f5 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -188,7 +188,7 @@ static void multistate(struct Curl_one_easy *easy, CURLMstate state)
"CANCELLED"
};
CURLMstate oldstate = easy->state;
- int index = -1;
+ long index = -1;
#endif
easy->state = state;
@@ -199,7 +199,7 @@ static void multistate(struct Curl_one_easy *easy, CURLMstate state)
index = easy->easy_conn->connectindex;
infof(easy->easy_handle,
- "STATE: %s => %s handle %p; (connection #%d) \n",
+ "STATE: %s => %s handle %p; (connection #%ld) \n",
statename[oldstate], statename[easy->state],
(char *)easy, index);
#endif
@@ -1554,7 +1554,7 @@ CURLMcode curl_multi_setopt(CURLM *multi_handle,
multi->socket_userp = va_arg(param, void *);
break;
case CURLMOPT_PIPELINING:
- multi->pipelining_enabled = va_arg(param, long);
+ multi->pipelining_enabled = (bool)(0 != va_arg(param, long));
break;
default:
res = CURLM_UNKNOWN_OPTION;