1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

fix compiler warning: variable was set but never used

This commit is contained in:
Yang Tse 2009-05-28 16:19:03 +00:00
parent f13cbcf175
commit 348ffbc47e

View File

@ -130,19 +130,22 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
size_t buffersize = (size_t)bytes; size_t buffersize = (size_t)bytes;
int nread; int nread;
#ifdef CURL_DOES_CONVERSIONS
bool sending_http_headers = FALSE; bool sending_http_headers = FALSE;
if(data->req.upload_chunky) {
/* if chunked Transfer-Encoding */
buffersize -= (8 + 2 + 2); /* 32bit hex + CRLF + CRLF */
data->req.upload_fromhere += (8 + 2); /* 32bit hex + CRLF */
}
if((conn->protocol&PROT_HTTP) && if((conn->protocol&PROT_HTTP) &&
(data->state.proto.http->sending == HTTPSEND_REQUEST)) { (data->state.proto.http->sending == HTTPSEND_REQUEST)) {
/* We're sending the HTTP request headers, not the data. /* We're sending the HTTP request headers, not the data.
Remember that so we don't re-translate them into garbage. */ Remember that so we don't re-translate them into garbage. */
sending_http_headers = TRUE; sending_http_headers = TRUE;
} }
#endif
if(data->req.upload_chunky) {
/* if chunked Transfer-Encoding */
buffersize -= (8 + 2 + 2); /* 32bit hex + CRLF + CRLF */
data->req.upload_fromhere += (8 + 2); /* 32bit hex + CRLF */
}
/* this function returns a size_t, so we typecast to int to prevent warnings /* this function returns a size_t, so we typecast to int to prevent warnings
with picky compilers */ with picky compilers */