mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Dan Fandrich fix: eliminates some pedantic CodeWarrior compiler warnings and
errors.
This commit is contained in:
parent
d46a573bbe
commit
dcea109bb5
@ -174,7 +174,8 @@ void Curl_global_host_cache_dtor(void)
|
|||||||
int Curl_num_addresses(const Curl_addrinfo *addr)
|
int Curl_num_addresses(const Curl_addrinfo *addr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; addr; addr = addr->ai_next, i++);
|
for (i = 0; addr; addr = addr->ai_next, i++)
|
||||||
|
; /* empty loop */
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ static void send_negotiation(struct connectdata *conn, int cmd, int option)
|
|||||||
buf[1] = cmd;
|
buf[1] = cmd;
|
||||||
buf[2] = option;
|
buf[2] = option;
|
||||||
|
|
||||||
(void)swrite(conn->sock[FIRSTSOCKET], buf, 3);
|
(void)swrite(conn->sock[FIRSTSOCKET], (char *)buf, 3);
|
||||||
|
|
||||||
printoption(conn->data, "SENT", cmd, option);
|
printoption(conn->data, "SENT", cmd, option);
|
||||||
}
|
}
|
||||||
@ -861,7 +861,7 @@ static void suboption(struct connectdata *conn)
|
|||||||
snprintf((char *)temp, sizeof(temp),
|
snprintf((char *)temp, sizeof(temp),
|
||||||
"%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_TTYPE,
|
"%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_TTYPE,
|
||||||
CURL_TELQUAL_IS, tn->subopt_ttype, CURL_IAC, CURL_SE);
|
CURL_TELQUAL_IS, tn->subopt_ttype, CURL_IAC, CURL_SE);
|
||||||
(void)swrite(conn->sock[FIRSTSOCKET], temp, len);
|
(void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len);
|
||||||
printsub(data, '>', &temp[2], len-2);
|
printsub(data, '>', &temp[2], len-2);
|
||||||
break;
|
break;
|
||||||
case CURL_TELOPT_XDISPLOC:
|
case CURL_TELOPT_XDISPLOC:
|
||||||
@ -869,7 +869,7 @@ static void suboption(struct connectdata *conn)
|
|||||||
snprintf((char *)temp, sizeof(temp),
|
snprintf((char *)temp, sizeof(temp),
|
||||||
"%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_XDISPLOC,
|
"%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_XDISPLOC,
|
||||||
CURL_TELQUAL_IS, tn->subopt_xdisploc, CURL_IAC, CURL_SE);
|
CURL_TELQUAL_IS, tn->subopt_xdisploc, CURL_IAC, CURL_SE);
|
||||||
(void)swrite(conn->sock[FIRSTSOCKET], temp, len);
|
(void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len);
|
||||||
printsub(data, '>', &temp[2], len-2);
|
printsub(data, '>', &temp[2], len-2);
|
||||||
break;
|
break;
|
||||||
case CURL_TELOPT_NEW_ENVIRON:
|
case CURL_TELOPT_NEW_ENVIRON:
|
||||||
@ -892,7 +892,7 @@ static void suboption(struct connectdata *conn)
|
|||||||
snprintf((char *)&temp[len], sizeof(temp) - len,
|
snprintf((char *)&temp[len], sizeof(temp) - len,
|
||||||
"%c%c", CURL_IAC, CURL_SE);
|
"%c%c", CURL_IAC, CURL_SE);
|
||||||
len += 2;
|
len += 2;
|
||||||
(void)swrite(conn->sock[FIRSTSOCKET], temp, len);
|
(void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len);
|
||||||
printsub(data, '>', &temp[2], len-2);
|
printsub(data, '>', &temp[2], len-2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
/* Find the first non-space letter */
|
/* Find the first non-space letter */
|
||||||
for(start=k->p+13;
|
for(start=k->p+13;
|
||||||
*start && isspace((int)*start);
|
*start && isspace((int)*start);
|
||||||
start++);
|
start++)
|
||||||
|
; /* empty loop */
|
||||||
|
|
||||||
end = strchr(start, '\r');
|
end = strchr(start, '\r');
|
||||||
if(!end)
|
if(!end)
|
||||||
@ -705,7 +706,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
|
|
||||||
if(end) {
|
if(end) {
|
||||||
/* skip all trailing space letters */
|
/* skip all trailing space letters */
|
||||||
for(; isspace((int)*end) && (end > start); end--);
|
for(; isspace((int)*end) && (end > start); end--)
|
||||||
|
; /* empty loop */
|
||||||
|
|
||||||
/* get length of the type */
|
/* get length of the type */
|
||||||
len = end-start+1;
|
len = end-start+1;
|
||||||
@ -796,7 +798,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
/* Find the first non-space letter */
|
/* Find the first non-space letter */
|
||||||
for(start=k->p+17;
|
for(start=k->p+17;
|
||||||
*start && isspace((int)*start);
|
*start && isspace((int)*start);
|
||||||
start++);
|
start++)
|
||||||
|
; /* empty loop */
|
||||||
|
|
||||||
/* Record the content-encoding for later use */
|
/* Record the content-encoding for later use */
|
||||||
if (checkprefix("identity", start))
|
if (checkprefix("identity", start))
|
||||||
|
@ -206,7 +206,8 @@ void Curl_safefree(void *ptr)
|
|||||||
CURLcode Curl_close(struct SessionHandle *data)
|
CURLcode Curl_close(struct SessionHandle *data)
|
||||||
{
|
{
|
||||||
/* Loop through all open connections and kill them one by one */
|
/* Loop through all open connections and kill them one by one */
|
||||||
while(-1 != ConnectionKillOne(data));
|
while(-1 != ConnectionKillOne(data))
|
||||||
|
; /* empty loop */
|
||||||
|
|
||||||
if ( ! (data->share && data->share->hostcache) ) {
|
if ( ! (data->share && data->share->hostcache) ) {
|
||||||
if ( !Curl_global_host_cache_use(data)) {
|
if ( !Curl_global_host_cache_use(data)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user