1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

- Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings and

contributed a range of patches to fix them.
This commit is contained in:
Daniel Stenberg 2009-06-10 21:26:11 +00:00
parent 9d18c0b156
commit 352177090f
10 changed files with 12 additions and 16 deletions

View File

@ -6,6 +6,10 @@
Changelog
Daniel Stenberg (10 Jun 2009)
- Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings and
contributed a range of patches to fix them.
Yang Tse (9 Jun 2009)
- Daniel Steinberg pointed out that Curl_FormInit() in formdata.c was not
initializing the fread callback pointer and this triggered a compiler

View File

@ -37,5 +37,6 @@ advice from friends like these:
Yang Tse, Daniel Fandrich, Kamil Dudka, Caolan McNamara, Frank McGeough,
Andre Guibert de Bruet, Mike Crowe, Claes Jakobsson, John E. Malmberg,
Aaron Oneal, Igor Novoseltsev, Eric Wong, Bill Hoffman, Daniel Steinberg,
Fabian Keil
Thanks! (and sorry if I forgot to mention someone)

View File

@ -405,7 +405,7 @@ Curl_cookie_add(struct SessionHandle *data,
}
ptr=semiptr+1;
while(ptr && *ptr && ISBLANK(*ptr))
while(*ptr && ISBLANK(*ptr))
ptr++;
semiptr=strchr(ptr, ';'); /* now, find the next semicolon */

View File

@ -182,7 +182,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
*strategy++ = (char)0;
nthdef = strchr(strategy, ':');
if(nthdef) {
*nthdef++ = (char)0;
*nthdef = (char)0;
}
}
}
@ -238,7 +238,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
*database++ = (char)0;
nthdef = strchr(database, ':');
if(nthdef) {
*nthdef++ = (char)0;
*nthdef = (char)0;
}
}
}

View File

@ -1417,10 +1417,9 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
/* if timeout is requested, find out how much remaining time we have */
check = timeout - /* timeout time */
Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */
if(check <=0 ) {
if(check <= 0) {
failf(data, "Proxy CONNECT aborted due to timeout");
error = SELECT_TIMEOUT; /* already too little time */
break;
return CURLE_RECV_ERROR;
}
/* if we're in multi-mode and we would block, return instead for a retry */

View File

@ -345,7 +345,6 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
conn->trailer[conn->trlPos]=0;
if(conn->trlPos==2) {
ch->state = CHUNK_STOP;
datap++;
length--;
/*
@ -400,7 +399,6 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
case CHUNK_STOP:
if(*datap == 0x0a) {
datap++;
length--;
/* Record the length of any data left in the end of the buffer

View File

@ -133,12 +133,11 @@ static size_t convert_lineends(struct SessionHandle *data,
*outPtr = *inPtr;
}
outPtr++;
inPtr++;
}
if(outPtr < startPtr+size) {
if(outPtr < startPtr+size)
/* tidy up by null terminating the now shorter data */
*outPtr = '\0';
}
return(outPtr - startPtr);
}
return(size);

View File

@ -857,7 +857,6 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
/* timeout */
failf(data, "SSL shutdown timeout");
done = 1;
break;
}
else {
/* anything that gets here is fatally bad */
@ -2272,7 +2271,6 @@ ossl_connect_common(struct connectdata *conn,
return retcode;
}
timeout_ms = 0;
while(ssl_connect_2 == connssl->connecting_state ||
ssl_connect_2_reading == connssl->connecting_state ||
ssl_connect_2_writing == connssl->connecting_state) {

View File

@ -3489,7 +3489,6 @@ static bool check_noproxy(const char* name, const char* no_proxy)
else
namelen = strlen(name);
tok_start = 0;
for (tok_start = 0; tok_start < no_proxy_len; tok_start = tok_end + 1) {
while (tok_start < no_proxy_len &&
strchr(separator, no_proxy[tok_start]) != NULL) {

View File

@ -2702,7 +2702,6 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
break;
case 'Q':
/* QUOTE command to send to FTP server */
err = PARAM_OK;
switch(nextarg[0]) {
case '-':
/* prefixed with a dash makes it a POST TRANSFER one */
@ -3382,7 +3381,6 @@ static int myprogress (void *clientp,
percent = frac * 100.0f;
barwidth = bar->width - 7;
num = (int) (((double)barwidth) * frac);
i = 0;
for ( i = 0; i < num; i++ ) {
line[i] = '#';
}