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); DSIZ - z->avail_out);
/* if !CURLE_OK, clean up, return */ /* if !CURLE_OK, clean up, return */
if (result) { if (result) {
return exit_zlib(z, &k->zlib_init, result); return exit_zlib(z, &k->zlib_init, (CURLcode)result);
} }
/* Done?; clean up, return */ /* Done?; clean up, return */
if (status == Z_STREAM_END) { if (status == Z_STREAM_END) {
if (inflateEnd(z) == Z_OK) if (inflateEnd(z) == Z_OK)
return exit_zlib(z, &k->zlib_init, result); return exit_zlib(z, &k->zlib_init, (CURLcode)result);
else else
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z)); return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
} }
/* Done with these bytes, exit */ /* Done with these bytes, exit */
if (status == Z_OK && z->avail_in == 0 && z->avail_out > 0) if (status == Z_OK && z->avail_in == 0 && z->avail_out > 0)
return result; return (CURLcode)result;
} }
else { /* Error; exit loop, handle below */ else { /* Error; exit loop, handle below */
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z)); 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; struct timeval now = start;
int fd; int fd;
(void)now;
/* get the fd from the connection phase */ /* get the fd from the connection phase */
fd = conn->proto.file->fd; 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 */ Curl_tvdiff(Curl_tvnow(), conn->now)/1000; /* spent time */
if(timeout <=0 ) { if(timeout <=0 ) {
failf(data, "Transfer aborted due to timeout"); 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; tn = (struct TELNET *)conn->proto.telnet;
code = check_telnet_options(conn); code = (CURLcode)check_telnet_options(conn);
if(code) if(code)
return code; return code;

View File

@ -246,7 +246,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if(0>result) if(0>result)
break; /* get out of loop */ break; /* get out of loop */
if(result>0) if(result>0)
return result; return (CURLcode)result;
if ((k->bytecount == 0) && (k->writebytecount == 0)) if ((k->bytecount == 0) && (k->writebytecount == 0))
Curl_pgrsTime(data, TIMER_STARTTRANSFER); Curl_pgrsTime(data, TIMER_STARTTRANSFER);
@ -426,7 +426,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
data->state.headerbuff, data->state.headerbuff,
headerlen); headerlen);
if(result) if(result)
return result; return (CURLcode)result;
data->info.header_size += headerlen; data->info.header_size += headerlen;
conn->headerbytecount += headerlen; conn->headerbytecount += headerlen;
@ -723,7 +723,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
result = Curl_client_write(data, k->writetype, k->p, result = Curl_client_write(data, k->writetype, k->p,
k->hbuflen); k->hbuflen);
if(result) if(result)
return result; return (CURLcode)result;
data->info.header_size += k->hbuflen; data->info.header_size += k->hbuflen;
conn->headerbytecount += k->hbuflen; conn->headerbytecount += k->hbuflen;
@ -906,7 +906,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
k->badheader = HEADER_NORMAL; /* taken care of now */ k->badheader = HEADER_NORMAL; /* taken care of now */
if(result) if(result)
return result; return (CURLcode)result;
} }
} /* if (! header and data to read ) */ } /* if (! header and data to read ) */
@ -997,7 +997,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
conn->upload_present, /* buffer size */ conn->upload_present, /* buffer size */
&bytes_written); /* actually send away */ &bytes_written); /* actually send away */
if(result) if(result)
return result; return (CURLcode)result;
else if(conn->upload_present != bytes_written) { else if(conn->upload_present != bytes_written) {
/* we only wrote a part of the buffer (if anything), deal with it! */ /* we only wrote a part of the buffer (if anything), deal with it! */
@ -1063,7 +1063,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
else else
result = Curl_speedcheck (data, k->now); result = Curl_speedcheck (data, k->now);
if (result) if (result)
return result; return (CURLcode)result;
if (data->set.timeout && if (data->set.timeout &&
((Curl_tvdiff(k->now, k->start)/1000) >= 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 * 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; break;
case CURLOPT_FOLLOWLOCATION: 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 * Set HTTP time condition. This must be one of the defines in the
* curl/curl.h header file. * curl/curl.h header file.
*/ */
data->set.timecondition = va_arg(param, long); data->set.timecondition = (curl_TimeCond)va_arg(param, long);
break; break;
case CURLOPT_TIMEVALUE: case CURLOPT_TIMEVALUE:
/* /*
@ -1086,7 +1086,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
/* /*
* Set proxy type. HTTP/SOCKS4/SOCKS5 * Set proxy type. HTTP/SOCKS4/SOCKS5
*/ */
data->set.proxytype = va_arg(param, long); data->set.proxytype = (curl_proxytype)va_arg(param, long);
break; break;
case CURLOPT_PRIVATE: case CURLOPT_PRIVATE:
@ -1409,7 +1409,7 @@ static int handleSock5Proxy(
return 1; 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)) { if ((result != CURLE_OK) || (actualread != 2)) {
failf(conn->data, "Unable to receive initial SOCKS5 response."); failf(conn->data, "Unable to receive initial SOCKS5 response.");
return 1; return 1;
@ -1452,7 +1452,7 @@ static int handleSock5Proxy(
return 1; 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)) { if ((result != CURLE_OK) || (actualread != 2)) {
failf(conn->data, "Unable to receive SOCKS5 sub-negotiation response."); failf(conn->data, "Unable to receive SOCKS5 sub-negotiation response.");
return 1; return 1;
@ -1542,7 +1542,7 @@ static int handleSock5Proxy(
return 1; 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)) { if ((result != CURLE_OK) || (actualread != packetsize)) {
failf(conn->data, "Failed to receive SOCKS5 connect request ack."); failf(conn->data, "Failed to receive SOCKS5 connect request ack.");
return 1; return 1;