diff --git a/Source/CTest/Curl/content_encoding.c b/Source/CTest/Curl/content_encoding.c index 80d9eec5b..e20e26e3e 100644 --- a/Source/CTest/Curl/content_encoding.c +++ b/Source/CTest/Curl/content_encoding.c @@ -91,20 +91,20 @@ Curl_unencode_deflate_write(struct SessionHandle *data, DSIZ - z->avail_out); /* if !CURLE_OK, clean up, return */ if (result) { - return exit_zlib(z, &k->zlib_init, result); + return exit_zlib(z, &k->zlib_init, (CURLcode)result); } /* Done?; clean up, return */ if (status == Z_STREAM_END) { if (inflateEnd(z) == Z_OK) - return exit_zlib(z, &k->zlib_init, result); + return exit_zlib(z, &k->zlib_init, (CURLcode)result); else return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z)); } /* Done with these bytes, exit */ if (status == Z_OK && z->avail_in == 0 && z->avail_out > 0) - return result; + return (CURLcode)result; } else { /* Error; exit loop, handle below */ return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z)); diff --git a/Source/CTest/Curl/file.c b/Source/CTest/Curl/file.c index 59b9bac3b..3dedbbcf9 100644 --- a/Source/CTest/Curl/file.c +++ b/Source/CTest/Curl/file.c @@ -150,6 +150,8 @@ CURLcode Curl_file(struct connectdata *conn) struct timeval now = start; int fd; + (void)now; + /* get the fd from the connection phase */ fd = conn->proto.file->fd; diff --git a/Source/CTest/Curl/http.c b/Source/CTest/Curl/http.c index c7a7647bc..9b9fa8ebd 100644 --- a/Source/CTest/Curl/http.c +++ b/Source/CTest/Curl/http.c @@ -428,7 +428,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, Curl_tvdiff(Curl_tvnow(), conn->now)/1000; /* spent time */ if(timeout <=0 ) { failf(data, "Transfer aborted due to timeout"); - return -SELECT_TIMEOUT; /* already too little time */ + return (CURLcode)-SELECT_TIMEOUT; /* already too little time */ } } diff --git a/Source/CTest/Curl/telnet.c b/Source/CTest/Curl/telnet.c index 56d3ebdfd..c9db4cabc 100644 --- a/Source/CTest/Curl/telnet.c +++ b/Source/CTest/Curl/telnet.c @@ -1068,7 +1068,7 @@ CURLcode Curl_telnet(struct connectdata *conn) tn = (struct TELNET *)conn->proto.telnet; - code = check_telnet_options(conn); + code = (CURLcode)check_telnet_options(conn); if(code) return code; diff --git a/Source/CTest/Curl/transfer.c b/Source/CTest/Curl/transfer.c index 7e3bfd844..ca7731b1c 100644 --- a/Source/CTest/Curl/transfer.c +++ b/Source/CTest/Curl/transfer.c @@ -246,7 +246,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if(0>result) break; /* get out of loop */ if(result>0) - return result; + return (CURLcode)result; if ((k->bytecount == 0) && (k->writebytecount == 0)) Curl_pgrsTime(data, TIMER_STARTTRANSFER); @@ -426,7 +426,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, data->state.headerbuff, headerlen); if(result) - return result; + return (CURLcode)result; data->info.header_size += headerlen; conn->headerbytecount += headerlen; @@ -723,7 +723,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, result = Curl_client_write(data, k->writetype, k->p, k->hbuflen); if(result) - return result; + return (CURLcode)result; data->info.header_size += k->hbuflen; conn->headerbytecount += k->hbuflen; @@ -906,7 +906,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, k->badheader = HEADER_NORMAL; /* taken care of now */ if(result) - return result; + return (CURLcode)result; } } /* if (! header and data to read ) */ @@ -997,7 +997,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, conn->upload_present, /* buffer size */ &bytes_written); /* actually send away */ if(result) - return result; + return (CURLcode)result; else if(conn->upload_present != bytes_written) { /* we only wrote a part of the buffer (if anything), deal with it! */ @@ -1063,7 +1063,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, else result = Curl_speedcheck (data, k->now); if (result) - return result; + return (CURLcode)result; if (data->set.timeout && ((Curl_tvdiff(k->now, k->start)/1000) >= data->set.timeout)) { diff --git a/Source/CTest/Curl/url.c b/Source/CTest/Curl/url.c index b7460cd98..d94fd44a1 100644 --- a/Source/CTest/Curl/url.c +++ b/Source/CTest/Curl/url.c @@ -476,7 +476,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) /* * Parse the $HOME/.netrc file */ - data->set.use_netrc = va_arg(param, long); + data->set.use_netrc = (enum CURL_NETRC_OPTION)va_arg(param, long); break; case CURLOPT_FOLLOWLOCATION: /* @@ -513,7 +513,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) * Set HTTP time condition. This must be one of the defines in the * curl/curl.h header file. */ - data->set.timecondition = va_arg(param, long); + data->set.timecondition = (curl_TimeCond)va_arg(param, long); break; case CURLOPT_TIMEVALUE: /* @@ -1086,7 +1086,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) /* * Set proxy type. HTTP/SOCKS4/SOCKS5 */ - data->set.proxytype = va_arg(param, long); + data->set.proxytype = (curl_proxytype)va_arg(param, long); break; case CURLOPT_PRIVATE: @@ -1409,7 +1409,7 @@ static int handleSock5Proxy( return 1; } - result=Curl_read(conn, sock, (char *)socksreq, 2, &actualread); + result=(CURLcode)Curl_read(conn, sock, (char *)socksreq, 2, &actualread); if ((result != CURLE_OK) || (actualread != 2)) { failf(conn->data, "Unable to receive initial SOCKS5 response."); return 1; @@ -1452,7 +1452,7 @@ static int handleSock5Proxy( return 1; } - result=Curl_read(conn, sock, (char *)socksreq, 2, &actualread); + result=(CURLcode)Curl_read(conn, sock, (char *)socksreq, 2, &actualread); if ((result != CURLE_OK) || (actualread != 2)) { failf(conn->data, "Unable to receive SOCKS5 sub-negotiation response."); return 1; @@ -1542,7 +1542,7 @@ static int handleSock5Proxy( return 1; } - result = Curl_read(conn, sock, (char *)socksreq, packetsize, &actualread); + result = (CURLcode)Curl_read(conn, sock, (char *)socksreq, packetsize, &actualread); if ((result != CURLE_OK) || (actualread != packetsize)) { failf(conn->data, "Failed to receive SOCKS5 connect request ack."); return 1;