contributed a range of patches to fix them.
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
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)
}
ptr=semiptr+1;
- while(ptr && *ptr && ISBLANK(*ptr))
+ while(*ptr && ISBLANK(*ptr))
ptr++;
semiptr=strchr(ptr, ';'); /* now, find the next semicolon */
*strategy++ = (char)0;
nthdef = strchr(strategy, ':');
if(nthdef) {
- *nthdef++ = (char)0;
+ *nthdef = (char)0;
}
}
}
*database++ = (char)0;
nthdef = strchr(database, ':');
if(nthdef) {
- *nthdef++ = (char)0;
+ *nthdef = (char)0;
}
}
}
/* 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 */
conn->trailer[conn->trlPos]=0;
if(conn->trlPos==2) {
ch->state = CHUNK_STOP;
- datap++;
length--;
/*
case CHUNK_STOP:
if(*datap == 0x0a) {
- datap++;
length--;
/* Record the length of any data left in the end of the buffer
*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);
/* timeout */
failf(data, "SSL shutdown timeout");
done = 1;
- break;
}
else {
/* anything that gets here is fatally bad */
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) {
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) {
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 */
percent = frac * 100.0f;
barwidth = bar->width - 7;
num = (int) (((double)barwidth) * frac);
- i = 0;
for ( i = 0; i < num; i++ ) {
line[i] = '#';
}