ERR: Remove a bunch of warnings on SGI

This commit is contained in:
Bill Hoffman 2003-05-12 17:11:45 -04:00
parent 70d3fe1a34
commit 1328164208
6 changed files with 19 additions and 17 deletions

View File

@ -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));

View File

@ -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;

View File

@ -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 */
}
}

View File

@ -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;

View File

@ -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)) {

View File

@ -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;