aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-11-18 14:04:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-11-18 14:04:40 +0000
commitdcea109bb5ce1c8afeb0510945eb15e86cfcf1dc (patch)
tree368d27b14ccfb3b3e775da0a8f30bc6f6e188203 /lib
parentd46a573bbedae5fdf402d47ce4bd8e84347c390c (diff)
Dan Fandrich fix: eliminates some pedantic CodeWarrior compiler warnings and
errors.
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.c3
-rw-r--r--lib/telnet.c8
-rw-r--r--lib/transfer.c9
-rw-r--r--lib/url.c3
4 files changed, 14 insertions, 9 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 7bb8c966c..fc72cb8c3 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -174,7 +174,8 @@ void Curl_global_host_cache_dtor(void)
int Curl_num_addresses(const Curl_addrinfo *addr)
{
int i;
- for (i = 0; addr; addr = addr->ai_next, i++);
+ for (i = 0; addr; addr = addr->ai_next, i++)
+ ; /* empty loop */
return i;
}
diff --git a/lib/telnet.c b/lib/telnet.c
index a2208f67a..fb8487a2b 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -298,7 +298,7 @@ static void send_negotiation(struct connectdata *conn, int cmd, int option)
buf[1] = cmd;
buf[2] = option;
- (void)swrite(conn->sock[FIRSTSOCKET], buf, 3);
+ (void)swrite(conn->sock[FIRSTSOCKET], (char *)buf, 3);
printoption(conn->data, "SENT", cmd, option);
}
@@ -861,7 +861,7 @@ static void suboption(struct connectdata *conn)
snprintf((char *)temp, sizeof(temp),
"%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_TTYPE,
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);
break;
case CURL_TELOPT_XDISPLOC:
@@ -869,7 +869,7 @@ static void suboption(struct connectdata *conn)
snprintf((char *)temp, sizeof(temp),
"%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_XDISPLOC,
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);
break;
case CURL_TELOPT_NEW_ENVIRON:
@@ -892,7 +892,7 @@ static void suboption(struct connectdata *conn)
snprintf((char *)&temp[len], sizeof(temp) - len,
"%c%c", CURL_IAC, CURL_SE);
len += 2;
- (void)swrite(conn->sock[FIRSTSOCKET], temp, len);
+ (void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len);
printsub(data, '>', &temp[2], len-2);
break;
}
diff --git a/lib/transfer.c b/lib/transfer.c
index 389ed6e16..79ecc02b8 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -697,7 +697,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
/* Find the first non-space letter */
for(start=k->p+13;
*start && isspace((int)*start);
- start++);
+ start++)
+ ; /* empty loop */
end = strchr(start, '\r');
if(!end)
@@ -705,7 +706,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if(end) {
/* 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 */
len = end-start+1;
@@ -796,7 +798,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
/* Find the first non-space letter */
for(start=k->p+17;
*start && isspace((int)*start);
- start++);
+ start++)
+ ; /* empty loop */
/* Record the content-encoding for later use */
if (checkprefix("identity", start))
diff --git a/lib/url.c b/lib/url.c
index 6ee238360..882d74719 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -206,7 +206,8 @@ void Curl_safefree(void *ptr)
CURLcode Curl_close(struct SessionHandle *data)
{
/* 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 ( !Curl_global_host_cache_use(data)) {