Variable type cleanups to please the picky MIPSPro compiler.

This commit is contained in:
Daniel Stenberg 2004-07-01 08:10:21 +00:00
parent f05d47ddd6
commit 090b89cc76
6 changed files with 18 additions and 16 deletions

View File

@ -219,7 +219,7 @@ int waitconnect(curl_socket_t sockfd, /* socket */
FD_ZERO(&errfd);
FD_SET(sockfd, &errfd);
interval.tv_sec = timeout_msec/1000;
interval.tv_sec = (int)(timeout_msec/1000);
timeout_msec -= interval.tv_sec*1000;
interval.tv_usec = timeout_msec*1000;
@ -674,7 +674,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
*connected = FALSE; /* default to not connected */
if(data->set.timeout || data->set.connecttimeout) {
double has_passed;
long has_passed;
/* Evaluate in milliseconds how much time that has passed */
has_passed = Curl_tvdiff(Curl_tvnow(), data->progress.start);
@ -696,7 +696,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
timeout_ms = data->set.connecttimeout*1000;
/* subtract the passed time */
timeout_ms -= (long)has_passed;
timeout_ms -= has_passed;
if(timeout_ms < 0) {
/* a precaution, no need to continue if time already is up */

View File

@ -39,14 +39,15 @@
/* The last #include file should be: */
#include "memdebug.h"
char *curl_escape(const char *string, int length)
char *curl_escape(const char *string, int inlength)
{
size_t alloc = (length?(size_t)length:strlen(string))+1;
size_t alloc = (inlength?(size_t)inlength:strlen(string))+1;
char *ns;
char *testing_ptr = NULL;
unsigned char in;
size_t newlen = alloc;
int strindex=0;
size_t length;
ns = malloc(alloc);
if(!ns)

View File

@ -633,7 +633,7 @@ static int Store_SSL_Session(struct connectdata *conn,
int i;
struct SessionHandle *data=conn->data; /* the mother of all structs */
struct curl_ssl_session *store = &data->state.session[0];
int oldest_age=data->state.session[0].age; /* zero if unused */
long oldest_age=data->state.session[0].age; /* zero if unused */
char *clone_host;
clone_host = strdup(conn->host.name);
@ -1351,7 +1351,7 @@ Curl_SSLConnect(struct connectdata *conn,
/* we have been connected fine, get out of the connect loop */
break;
interval.tv_sec = timeout_ms/1000;
interval.tv_sec = (int)(timeout_ms/1000);
timeout_ms -= interval.tv_sec*1000;
interval.tv_usec = timeout_ms*1000;

View File

@ -120,7 +120,8 @@ static void set_local_option(struct connectdata *, int cmd, int option);
static void set_remote_option(struct connectdata *, int cmd, int option);
static void printsub(struct SessionHandle *data,
int direction, unsigned char *pointer, int length);
int direction, unsigned char *pointer,
size_t length);
static void suboption(struct connectdata *);
/* For negotiation compliant to RFC 1143 */
@ -663,9 +664,9 @@ void rec_dont(struct connectdata *conn, int option)
static void printsub(struct SessionHandle *data,
int direction, /* '<' or '>' */
unsigned char *pointer, /* where suboption data is */
int length) /* length of suboption data */
size_t length) /* length of suboption data */
{
int i = 0;
unsigned int i = 0;
if (data->set.verbose)
{

View File

@ -253,7 +253,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
/* This is where we loop until we have read everything there is to
read or we get a EWOULDBLOCK */
do {
int buffersize = data->set.buffer_size?
size_t buffersize = data->set.buffer_size?
data->set.buffer_size:BUFSIZE -1;
/* receive data from the network! */
@ -303,8 +303,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
/* header line within buffer loop */
do {
int hbufp_index;
int rest_length;
size_t hbufp_index;
size_t rest_length;
size_t full_length;
int writetype;
@ -410,7 +410,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
}
if (('\n' == *k->p) || ('\r' == *k->p)) {
int headerlen;
size_t headerlen;
/* Zero-length header line means end of headers! */
if ('\r' == *k->p)
@ -1264,7 +1264,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
*/
int ms = Curl_tvdiff(k->now, k->start100);
long ms = Curl_tvdiff(k->now, k->start100);
if(ms > CURL_TIMEOUT_EXPECT_100) {
/* we've waited long enough, continue anyway */
k->write_after_100_header = FALSE;

View File

@ -578,7 +578,7 @@ struct connectdata {
/* 'upload_present' is used to keep a byte counter of how much data there is
still left in the buffer, aimed for upload. */
int upload_present;
ssize_t upload_present;
/* 'upload_fromhere' is used as a read-pointer when we uploaded parts of a
buffer, so the next read should read from where this pointer points to,