From a8ae8087c4a99f6840d822fd1fcba3c71e59b718 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 13 Jan 2008 04:39:32 +0000 Subject: fix compiler warning --- lib/socks.c | 2 +- src/main.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/socks.c b/lib/socks.c index c9cb85869..13b7caa36 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -392,7 +392,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, long timeout; bool socks5_resolve_local = (bool)(data->set.proxytype == CURLPROXY_SOCKS5); const size_t hostname_len = strlen(hostname); - int packetsize = 0; + ssize_t packetsize = 0; /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */ if(!socks5_resolve_local && hostname_len > 255) diff --git a/src/main.c b/src/main.c index 4f88cb2d4..1b0036bcd 100644 --- a/src/main.c +++ b/src/main.c @@ -1466,7 +1466,9 @@ static int sockoptcallback(void *clientp, curl_socket_t curlfd, struct Configurable *config = (struct Configurable *)clientp; int onoff = 1; /* this callback is only used if we ask for keepalives on the connection */ - long keepidle = config->alivetime; +#if defined(TCP_KEEPIDLE) || defined(TCP_KEEPINTVL) + int keepidle = (int)config->alivetime; +#endif switch (purpose) { case CURLSOCKTYPE_IPCXN: -- cgit v1.2.3