diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-05-02 13:31:52 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-05-02 13:31:52 (GMT) |
commit | 1bb8d8109e7a51a30c16e5dc1481bf83ba42eda6 (patch) | |
tree | e6d1ed87ca626d0945df3ad76d9185e02f6aae7f | |
parent | 7cefbad8dc4f6aa73781a98e758679b5c5dc4fbe (diff) | |
download | CMake-1bb8d8109e7a51a30c16e5dc1481bf83ba42eda6.zip CMake-1bb8d8109e7a51a30c16e5dc1481bf83ba42eda6.tar.gz CMake-1bb8d8109e7a51a30c16e5dc1481bf83ba42eda6.tar.bz2 |
ERR: Remove warnings on Visual Studio 7
-rw-r--r-- | Source/CTest/Curl/base64.c | 4 | ||||
-rw-r--r-- | Source/CTest/Curl/connect.c | 2 | ||||
-rw-r--r-- | Source/CTest/Curl/cookie.c | 10 | ||||
-rw-r--r-- | Source/CTest/Curl/formdata.c | 12 | ||||
-rw-r--r-- | Source/CTest/Curl/ftp.c | 23 | ||||
-rw-r--r-- | Source/CTest/Curl/getdate.c | 4 | ||||
-rw-r--r-- | Source/CTest/Curl/hash.c | 2 | ||||
-rw-r--r-- | Source/CTest/Curl/hostip.c | 6 | ||||
-rw-r--r-- | Source/CTest/Curl/http.c | 15 | ||||
-rw-r--r-- | Source/CTest/Curl/http_chunks.c | 2 | ||||
-rw-r--r-- | Source/CTest/Curl/mprintf.c | 12 | ||||
-rw-r--r-- | Source/CTest/Curl/sendf.c | 8 | ||||
-rw-r--r-- | Source/CTest/Curl/setup.h | 2 | ||||
-rw-r--r-- | Source/CTest/Curl/telnet.c | 8 | ||||
-rw-r--r-- | Source/CTest/Curl/transfer.c | 16 | ||||
-rw-r--r-- | Source/CTest/Curl/url.c | 12 |
16 files changed, 71 insertions, 67 deletions
diff --git a/Source/CTest/Curl/base64.c b/Source/CTest/Curl/base64.c index 95d4cf6..1e8da91 100644 --- a/Source/CTest/Curl/base64.c +++ b/Source/CTest/Curl/base64.c @@ -127,7 +127,7 @@ int Curl_base64_encode(const void *inp, int insize, char **outptr) char *indata = (char *)inp; if(0 == insize) - insize = strlen(indata); + insize = (int)strlen(indata); base64data = output = (char*)malloc(insize*4/3+4); if(NULL == output) @@ -177,7 +177,7 @@ int Curl_base64_encode(const void *inp, int insize, char **outptr) *output=0; *outptr = base64data; /* make it return the actual data memory */ - return strlen(base64data); /* return the length of the new data */ + return (int)strlen(base64data); /* return the length of the new data */ } /* ---- End of Base64 Encoding ---- */ diff --git a/Source/CTest/Curl/connect.c b/Source/CTest/Curl/connect.c index 1d1044c..05ce10d 100644 --- a/Source/CTest/Curl/connect.c +++ b/Source/CTest/Curl/connect.c @@ -592,7 +592,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ return CURLE_COULDNT_CONNECT; } /* create an IPv4 TCP socket */ - sockfd = socket(AF_INET, SOCK_STREAM, 0); + sockfd = (int)socket(AF_INET, SOCK_STREAM, 0); if(-1 == sockfd) { failf(data, "couldn't create socket"); return CURLE_COULDNT_CONNECT; /* big time error */ diff --git a/Source/CTest/Curl/cookie.c b/Source/CTest/Curl/cookie.c index b5569c0..4a2b83e 100644 --- a/Source/CTest/Curl/cookie.c +++ b/Source/CTest/Curl/cookie.c @@ -169,7 +169,7 @@ Curl_cookie_add(struct CookieInfo *c, char *whatptr; /* Strip off trailing whitespace from the 'what' */ - int len=strlen(what); + size_t len=strlen(what); while(len && isspace((int)what[len-1])) { what[len-1]=0; len--; @@ -203,11 +203,11 @@ Curl_cookie_add(struct CookieInfo *c, */ co->maxage = strdup(whatptr); co->expires = - atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]) + now; + atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]) + (long)now; } else if(strequal("expires", name)) { co->expirestr=strdup(whatptr); - co->expires = curl_getdate(what, &now); + co->expires = (long)curl_getdate(what, &now); } else if(!co->name) { co->name = strdup(name); @@ -560,7 +560,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, struct Cookie *newco; struct Cookie *co; time_t now = time(NULL); - int hostlen=strlen(host); + int hostlen=(int)strlen(host); int domlen; struct Cookie *mainco=NULL; @@ -578,7 +578,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, (co->secure?secure:TRUE) ) { /* now check if the domain is correct */ - domlen=co->domain?strlen(co->domain):0; + domlen=co->domain?(int)strlen(co->domain):0; if(!co->domain || ((domlen<=hostlen) && strequal(host+(hostlen-domlen), co->domain)) ) { diff --git a/Source/CTest/Curl/formdata.c b/Source/CTest/Curl/formdata.c index 15cbea0..fabead8 100644 --- a/Source/CTest/Curl/formdata.c +++ b/Source/CTest/Curl/formdata.c @@ -563,7 +563,7 @@ static int AllocAndCopy (char **buffer, int buffer_length) if (buffer_length) length = buffer_length; else { - length = strlen(*buffer); + length = (int)strlen(*buffer); add = 1; } *buffer = (char*)malloc(length+add); @@ -1011,7 +1011,7 @@ static int AddFormData(struct FormData **formp, /* we make it easier for plain strings: */ if(!length) - length = strlen((char *)line); + length = (long)strlen((char *)line); newform->line = (char *)malloc(length+1); memcpy(newform->line, line, length); @@ -1057,7 +1057,7 @@ char *Curl_FormBoundary(void) if(!retstring) return NULL; /* failed */ - srand(time(NULL)+randomizer++); /* seed */ + srand((unsigned int)(time(NULL)+randomizer++)); /* seed */ strcpy(retstring, "curl"); /* bonus commercials 8*) */ @@ -1239,7 +1239,7 @@ CURLcode Curl_getFormData(struct FormData **finalform, /*VMS?? Stream files are OK, as are FIXED & VAR files WITHOUT implied CC */ /*VMS?? For implied CC, every record needs to have a \n appended & 1 added to SIZE */ if(fileread) { - while((nread = fread(buffer, 1, 1024, fileread))) + while((nread = (int)fread(buffer, 1, 1024, fileread))) size += AddFormData(&form, buffer, nread); if(fileread != stdin) @@ -1316,7 +1316,7 @@ int Curl_FormReader(char *buffer, form=(struct Form *)mydata; - wantedsize = size * nitems; + wantedsize = (int)(size * nitems); if(!form->data) return 0; /* nothing, error, empty */ @@ -1362,7 +1362,7 @@ int Curl_FormReadOneLine(char *buffer, form=(struct Form *)mydata; - wantedsize = size * nitems; + wantedsize = (int)(size * nitems); if(!form->data) return -1; /* nothing, error, empty */ diff --git a/Source/CTest/Curl/ftp.c b/Source/CTest/Curl/ftp.c index d5b8fb6..0ddf0a3 100644 --- a/Source/CTest/Curl/ftp.c +++ b/Source/CTest/Curl/ftp.c @@ -146,7 +146,7 @@ static CURLcode AllowServerConnect(struct SessionHandle *data, struct sockaddr_in add; getsockname(sock, (struct sockaddr *) &add, (socklen_t *)&size); - s=accept(sock, (struct sockaddr *) &add, (socklen_t *)&size); + s=(int)accept(sock, (struct sockaddr *) &add, (socklen_t *)&size); sclose(sock); /* close the first socket */ @@ -263,7 +263,7 @@ CURLcode Curl_GetFTPResponse(int *nreadp, /* return number of bytes read */ /* we had data in the "cache", copy that instead of doing an actual read */ memcpy(ptr, ftp->cache, ftp->cache_size); - gotbytes = ftp->cache_size; + gotbytes = (int)ftp->cache_size; free(ftp->cache); /* free the cache */ ftp->cache = NULL; /* clear the pointer */ ftp->cache_size = 0; /* zero the size just in case */ @@ -1210,7 +1210,7 @@ CURLcode ftp_use_port(struct connectdata *conn) h = Curl_resolv(data, myhost, 0); } else { - int len = strlen(data->set.ftpport); + size_t len = strlen(data->set.ftpport); if(len>1) h = Curl_resolv(data, data->set.ftpport, 0); if(h) @@ -1236,7 +1236,7 @@ CURLcode ftp_use_port(struct connectdata *conn) Curl_resolv_unlock(h); if ( h || sa_filled_in) { - if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) { + if( (portsock = (int)socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) { int size; /* we set the secondary socket variable to this for now, it @@ -1592,17 +1592,17 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn) input. If we knew it was a proper file we could've just fseek()ed but we only have a stream here */ do { - int readthisamountnow = (conn->resume_from - passed); - int actuallyread; + size_t readthisamountnow = (conn->resume_from - passed); + size_t actuallyread; if(readthisamountnow > BUFSIZE) readthisamountnow = BUFSIZE; - actuallyread = + actuallyread = conn->fread(data->state.buffer, 1, readthisamountnow, conn->fread_in); - passed += actuallyread; + passed += (int)actuallyread; if(actuallyread != readthisamountnow) { failf(data, "Could only read %d bytes from the input", passed); return CURLE_FTP_COULDNT_USE_REST; @@ -1867,7 +1867,7 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn) char *bytes; bytes=strstr(buf, " bytes"); if(bytes--) { - int index=bytes-buf; + int index=(int)(bytes-buf); /* this is a hint there is size information in there! ;-) */ while(--index) { /* scan for the parenthesis and break there */ @@ -2066,7 +2066,8 @@ CURLcode Curl_ftp(struct connectdata *conn) ftp->file = strrchr(conn->ppath, '/'); if(ftp->file) { if(ftp->file != conn->ppath) - dirlength=ftp->file-conn->ppath; /* don't count the traling slash */ + /* don't count the traling slash */ + dirlength=(int)(ftp->file-conn->ppath); ftp->file++; /* point to the first letter in the file name part or remain NULL */ @@ -2138,7 +2139,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn, strcat(s, "\r\n"); /* append a trailing CRLF */ bytes_written=0; - write_len = strlen(s); + write_len = (int)strlen(s); do { res = Curl_write(conn, conn->firstsocket, sptr, write_len, diff --git a/Source/CTest/Curl/getdate.c b/Source/CTest/Curl/getdate.c index fe00823..6e521bc 100644 --- a/Source/CTest/Curl/getdate.c +++ b/Source/CTest/Curl/getdate.c @@ -728,7 +728,7 @@ yynewstate: #endif /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; + int size = (int)(yyssp - yyss + 1); #ifdef yyoverflow /* Each stack pointer address is followed by the size of @@ -1855,7 +1855,7 @@ LookupWord (yylval, buff) } /* Strip off any plural and try the units table again. */ - i = strlen (buff) - 1; + i = (int)strlen (buff) - 1; if (buff[i] == 's') { buff[i] = '\0'; diff --git a/Source/CTest/Curl/hash.c b/Source/CTest/Curl/hash.c index 56e7077..6d4ce2e 100644 --- a/Source/CTest/Curl/hash.c +++ b/Source/CTest/Curl/hash.c @@ -282,7 +282,7 @@ Curl_hash_clean_with_criterium(curl_hash *h, void *user, int Curl_hash_count(curl_hash *h) { - return h->size; + return (int)h->size; } /* }}} */ diff --git a/Source/CTest/Curl/hostip.c b/Source/CTest/Curl/hostip.c index d79e832..22727ba 100644 --- a/Source/CTest/Curl/hostip.c +++ b/Source/CTest/Curl/hostip.c @@ -240,7 +240,7 @@ struct Curl_dns_entry *Curl_resolv(struct SessionHandle *data, #endif /* Create an entry id, based upon the hostname and port */ - entry_len = strlen(hostname); + entry_len = (int)strlen(hostname); entry_id = create_hostcache_id(hostname, port, &entry_len); /* If we can't create the entry id, fail */ if (!entry_id) @@ -279,7 +279,7 @@ struct Curl_dns_entry *Curl_resolv(struct SessionHandle *data, /* Remove outdated and unused entries from the hostcache */ hostcache_prune(data->hostcache, data->set.dns_cache_timeout, - now); + (int)now); HOSTCACHE_RETURN(dns); } @@ -412,7 +412,7 @@ static struct hostent* pack_hostent(char** buf, struct hostent* orig) int i; char *str; - int len; + size_t len; bufptr = *buf; copy = (struct hostent*)bufptr; diff --git a/Source/CTest/Curl/http.c b/Source/CTest/Curl/http.c index 591da9c..c7a7647 100644 --- a/Source/CTest/Curl/http.c +++ b/Source/CTest/Curl/http.c @@ -106,7 +106,7 @@ static int readmoredata(char *buffer, { struct connectdata *conn = (struct connectdata *)userp; struct HTTP *http = conn->proto.http; - int fullsize = size * nitems; + int fullsize = (int)(size * nitems); if(0 == http->postsize) /* nothing to return */ @@ -195,7 +195,7 @@ CURLcode add_buffer_send(send_buffer *in, to the circumstances we will just loop and try again and again etc */ ptr = in->buffer; - size = in->size_used; + size = (int)in->size_used; res = Curl_write(conn, sockfd, ptr, size, &amount); @@ -274,7 +274,7 @@ CURLcode add_buffer(send_buffer *in, const void *inptr, size_t size) if(!in->buffer || ((in->size_used + size) > (in->size_max - 1))) { - new_size = (in->size_used+size)*2; + new_size = (int)((in->size_used+size)*2); if(in->buffer) /* we have a buffer, enlarge the existing one */ new_rb = (char *)realloc(in->buffer, new_size); @@ -666,7 +666,8 @@ CURLcode Curl_http(struct connectdata *conn) curl_strequal(data->state.auth_host, conn->hostname)) { sprintf(data->state.buffer, "%s:%s", data->state.user, data->state.passwd); - if(Curl_base64_encode(data->state.buffer, strlen(data->state.buffer), + if(Curl_base64_encode(data->state.buffer, + (int)strlen(data->state.buffer), &authorization) >= 0) { if(conn->allocptr.userpwd) free(conn->allocptr.userpwd); @@ -804,7 +805,7 @@ CURLcode Curl_http(struct connectdata *conn) if(readthisamountnow > BUFSIZE) readthisamountnow = BUFSIZE; - actuallyread = + actuallyread = (int) data->set.fread(data->state.buffer, 1, readthisamountnow, data->set.in); @@ -1125,9 +1126,9 @@ CURLcode Curl_http(struct connectdata *conn) /* and here we setup the pointers to the actual data */ if(data->set.postfields) { if(data->set.postfieldsize) - http->postsize = data->set.postfieldsize; + http->postsize = (int)data->set.postfieldsize; else - http->postsize = strlen(data->set.postfields); + http->postsize = (int)strlen(data->set.postfields); http->postdata = data->set.postfields; http->sending = HTTPSEND_BODY; diff --git a/Source/CTest/Curl/http_chunks.c b/Source/CTest/Curl/http_chunks.c index 6d2a640..4ee37b8 100644 --- a/Source/CTest/Curl/http_chunks.c +++ b/Source/CTest/Curl/http_chunks.c @@ -171,7 +171,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, We expect another 'datasize' of data. We have 'length' right now, it can be more or less than 'datasize'. Get the smallest piece. */ - piece = (ch->datasize >= length)?length:ch->datasize; + piece = (int)((ch->datasize >= length)?length:ch->datasize); /* Write the data portion available */ /* Added content-encoding here; untested but almost identical to the diff --git a/Source/CTest/Curl/mprintf.c b/Source/CTest/Curl/mprintf.c index e81cc7d..7822876 100644 --- a/Source/CTest/Curl/mprintf.c +++ b/Source/CTest/Curl/mprintf.c @@ -732,8 +732,8 @@ static int dprintf_formatf( *w-- = digits[num % base]; num /= base; } - width -= workend - w; - prec -= workend - w; + width -= (long)(workend - w); + prec -= (long)(workend - w); if (alt && base == 8 && prec <= 0) { *w-- = '0'; @@ -812,7 +812,7 @@ static int dprintf_formatf( if (prec != -1 && (size_t) prec < len) len = prec; - width -= len; + width -= (long)len; if (p->flags & FLAGS_ALT) OUTCHAR('"'); @@ -933,9 +933,9 @@ static int dprintf_formatf( else #endif if (p->flags & FLAGS_LONG) - *(long int *) p->data.ptr = done; + *(long int *) p->data.ptr = (long int)done; else if (!(p->flags & FLAGS_SHORT)) - *(int *) p->data.ptr = done; + *(int *) p->data.ptr = (int)done; else *(short int *) p->data.ptr = (short int)done; break; @@ -946,7 +946,7 @@ static int dprintf_formatf( f = *end++; /* goto end of %-code */ } - return done; + return (int)done; } /* fputc() look-alike */ diff --git a/Source/CTest/Curl/sendf.c b/Source/CTest/Curl/sendf.c index 9c9f14e..01cfb23 100644 --- a/Source/CTest/Curl/sendf.c +++ b/Source/CTest/Curl/sendf.c @@ -155,7 +155,7 @@ void Curl_failf(struct SessionHandle *data, const char *fmt, ...) data->state.errorbuf = TRUE; /* wrote error string */ if(data->set.verbose) { - int len = strlen(data->set.errorbuffer); + int len = (int)strlen(data->set.errorbuffer); bool doneit=FALSE; if(len < CURL_ERROR_SIZE) { doneit = TRUE; @@ -189,7 +189,7 @@ CURLcode Curl_sendf(int sockfd, struct connectdata *conn, return CURLE_OUT_OF_MEMORY; /* failure */ bytes_written=0; - write_len = strlen(s); + write_len = (int)strlen(s); sptr = s; do { @@ -265,7 +265,7 @@ CURLcode Curl_write(struct connectdata *conn, int sockfd, else #endif /* KRB4 */ { - bytes_written = swrite(sockfd, mem, len); + bytes_written = (int)swrite(sockfd, mem, (int)len); } if(-1 == bytes_written) { #ifdef WIN32 @@ -374,7 +374,7 @@ int Curl_read(struct connectdata *conn, nread = Curl_sec_read(conn, sockfd, buf, buffersize); else #endif - nread = sread (sockfd, buf, buffersize); + nread = sread (sockfd, buf, (int)buffersize); if(-1 == nread) { #ifdef WIN32 diff --git a/Source/CTest/Curl/setup.h b/Source/CTest/Curl/setup.h index d4b66d0..0f6a495 100644 --- a/Source/CTest/Curl/setup.h +++ b/Source/CTest/Curl/setup.h @@ -129,6 +129,8 @@ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO) #pragma warning ( disable : 4706 ) #pragma warning ( disable : 4131 ) /* Old style declaration */ #pragma warning ( disable : 4055 ) /* Cast void*(*)() to void* */ +#pragma warning ( disable : 4311 ) /* Allow cast from void* to long/int */ +#pragma warning ( disable : 4312 ) /* Allow cast from long to char* */ struct _RPC_ASYNC_STATE; #endif #if !defined(__GNUC__) || defined(__MINGW32__) diff --git a/Source/CTest/Curl/telnet.c b/Source/CTest/Curl/telnet.c index 7772d5e..876d311 100644 --- a/Source/CTest/Curl/telnet.c +++ b/Source/CTest/Curl/telnet.c @@ -826,10 +826,10 @@ static void suboption(struct connectdata *conn) struct SessionHandle *data = conn->data; struct TELNET *tn = (struct TELNET *)conn->proto.telnet; - printsub(data, '<', (unsigned char *)tn->subbuffer, SB_LEN(tn)+2); + printsub(data, '<', (unsigned char *)tn->subbuffer, (int)SB_LEN(tn)+2); switch (subchar = (unsigned char)SB_GET(tn)) { case TELOPT_TTYPE: - len = strlen(tn->subopt_ttype) + 4 + 2; + len = (int)strlen(tn->subopt_ttype) + 4 + 2; snprintf((char *)temp, sizeof(temp), "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, TELQUAL_IS, tn->subopt_ttype, IAC, SE); @@ -837,7 +837,7 @@ static void suboption(struct connectdata *conn) printsub(data, '>', &temp[2], len-2); break; case TELOPT_XDISPLOC: - len = strlen(tn->subopt_xdisploc) + 4 + 2; + len = (int)strlen(tn->subopt_xdisploc) + 4 + 2; snprintf((char *)temp, sizeof(temp), "%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC, TELQUAL_IS, tn->subopt_xdisploc, IAC, SE); @@ -850,7 +850,7 @@ static void suboption(struct connectdata *conn) len = 4; for(v = tn->telnet_vars;v;v = v->next) { - tmplen = (strlen(v->data) + 1); + tmplen = (int)(strlen(v->data) + 1); /* Add the variable only if it fits */ if(len + tmplen < (int)sizeof(temp)-6) { sscanf(v->data, "%127[^,],%s", varname, varval); diff --git a/Source/CTest/Curl/transfer.c b/Source/CTest/Curl/transfer.c index df253b1..7e3bfd8 100644 --- a/Source/CTest/Curl/transfer.c +++ b/Source/CTest/Curl/transfer.c @@ -134,8 +134,8 @@ static int fillbuffer(struct connectdata *conn, conn->upload_fromhere += 10; /* 32bit hex + CRLF */ } - nread = conn->fread(conn->upload_fromhere, 1, - buffersize, conn->fread_in); + nread = (int)conn->fread(conn->upload_fromhere, 1, + buffersize, conn->fread_in); if(!conn->bits.forbidchunk && conn->bits.upload_chunky) { /* if chunked Transfer-Encoding */ @@ -294,7 +294,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, char *newbuff; long newsize=MAX((k->hbuflen+nread)*3/2, data->state.headersize*2); - hbufp_index = k->hbufp - data->state.headerbuff; + hbufp_index = (int)(k->hbufp - data->state.headerbuff); newbuff = (char *)realloc(data->state.headerbuff, newsize); if(!newbuff) { failf (data, "Failed to alloc memory for big header!"); @@ -321,7 +321,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, } /* decrease the size of the remaining buffer */ - nread -= (k->end_ptr - k->str)+1; + nread -= (int)((k->end_ptr - k->str)+1); k->str = k->end_ptr + 1; /* move past new line */ @@ -334,10 +334,10 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (k->hbuflen + (k->str - k->str_start) >= data->state.headersize) { char *newbuff; - long newsize=MAX((k->hbuflen+ + long newsize=(long)MAX((k->hbuflen+ (k->str-k->str_start))*3/2, data->state.headersize*2); - hbufp_index = k->hbufp - data->state.headerbuff; + hbufp_index = (int)(k->hbufp - data->state.headerbuff); newbuff = (char *)realloc(data->state.headerbuff, newsize); if(!newbuff) { failf (data, "Failed to alloc memory for big header!"); @@ -351,7 +351,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, /* copy to end of line */ strncpy (k->hbufp, k->str_start, k->str - k->str_start); k->hbufp += k->str - k->str_start; - k->hbuflen += k->str - k->str_start; + k->hbuflen += (int)(k->str - k->str_start); *k->hbufp = 0; k->p = data->state.headerbuff; @@ -420,7 +420,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (data->set.http_include_header) k->writetype |= CLIENTWRITE_BODY; - headerlen = k->p - data->state.headerbuff; + headerlen = (int)(k->p - data->state.headerbuff); result = Curl_client_write(data, k->writetype, data->state.headerbuff, diff --git a/Source/CTest/Curl/url.c b/Source/CTest/Curl/url.c index bf97518..6016de1 100644 --- a/Source/CTest/Curl/url.c +++ b/Source/CTest/Curl/url.c @@ -1426,8 +1426,8 @@ static int handleSock5Proxy( /* Needs user name and password */ int userlen, pwlen, len; - userlen = strlen(proxy_name); - pwlen = strlen(proxy_password); + userlen = (int)strlen(proxy_name); + pwlen = (int)strlen(proxy_password); /* username/password request looks like * +----+------+----------+------+----------+ @@ -1813,7 +1813,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, * other parts of the code will rely on this fact ***********************************************************/ #define LEAST_PATH_ALLOC 256 - urllen=strlen(data->change.url); + urllen=(int)strlen(data->change.url); if(urllen < LEAST_PATH_ALLOC) urllen=LEAST_PATH_ALLOC; @@ -2009,9 +2009,9 @@ static CURLcode CreateConnection(struct SessionHandle *data, unsigned int namelen; char *endptr = strchr(conn->name, ':'); if(endptr) - namelen=endptr-conn->name; + namelen=(unsigned int)(endptr-conn->name); else - namelen=strlen(conn->name); + namelen=(unsigned int)strlen(conn->name); if(strlen(nope) <= namelen) { char *checkn= @@ -2779,7 +2779,7 @@ static CURLcode CreateConnection(struct SessionHandle *data, char *authorization; snprintf(data->state.buffer, BUFSIZE, "%s:%s", data->state.proxyuser, data->state.proxypasswd); - if(Curl_base64_encode(data->state.buffer, strlen(data->state.buffer), + if(Curl_base64_encode(data->state.buffer, (int)strlen(data->state.buffer), &authorization) >= 0) { if(conn->allocptr.proxyuserpwd) free(conn->allocptr.proxyuserpwd); |