diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-14 03:18:14 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-14 03:18:14 +0000 |
commit | 1c9426d6e027d4a7789471691ad1703b05f60fad (patch) | |
tree | 0892be29c16011091754cb7fbfe1275bc172a42b /src/or/buffers.c | |
parent | 3737566465f11bf2bd710239e38634590c4c4603 (diff) | |
download | tor-1c9426d6e027d4a7789471691ad1703b05f60fad.tar.gz tor-1c9426d6e027d4a7789471691ad1703b05f60fad.zip |
Build without warnings on mac gcc 3.3
svn:r2487
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 1d37d17a55..26c1e568ab 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -258,7 +258,7 @@ int flush_buf(int s, buf_t *buf, size_t *buf_flushlen) *buf_flushlen -= write_result; buf_remove_from_front(buf, write_result); log_fn(LOG_DEBUG,"%d: flushed %d bytes, %d ready to flush, %d remain.", - s,write_result,*buf_flushlen,(int)buf->datalen); + s,write_result,(int)*buf_flushlen,(int)buf->datalen); return write_result; } @@ -281,7 +281,7 @@ int flush_buf_tls(tor_tls *tls, buf_t *buf, size_t *buf_flushlen) *buf_flushlen -= r; buf_remove_from_front(buf, r); log_fn(LOG_DEBUG,"flushed %d bytes, %d ready to flush, %d remain.", - r,*buf_flushlen,(int)buf->datalen); + r,(int)*buf_flushlen,(int)buf->datalen); return r; } @@ -300,13 +300,13 @@ int write_to_buf(const char *string, size_t string_len, buf_t *buf) { assert_buf_ok(buf); if (buf_ensure_capacity(buf, buf->datalen+string_len)) { - log_fn(LOG_WARN, "buflen too small, can't hold %d bytes.", (int)buf->datalen+string_len); + log_fn(LOG_WARN, "buflen too small, can't hold %d bytes.", (int)(buf->datalen+string_len)); return -1; } memcpy(buf->mem+buf->datalen, string, string_len); buf->datalen += string_len; - log_fn(LOG_DEBUG,"added %d bytes to buf (now %d total).",string_len, (int)buf->datalen); + log_fn(LOG_DEBUG,"added %d bytes to buf (now %d total).",(int)string_len, (int)buf->datalen); return buf->datalen; } @@ -368,14 +368,15 @@ int fetch_from_buf_http(buf_t *buf, body += 4; /* Skip the the CRLFCRLF */ headerlen = body-headers; /* includes the CRLFCRLF */ bodylen = buf->datalen - headerlen; - log_fn(LOG_DEBUG,"headerlen %d, bodylen %d.", headerlen, bodylen); + log_fn(LOG_DEBUG,"headerlen %d, bodylen %d.", (int)headerlen, (int)bodylen); if(max_headerlen <= headerlen) { - log_fn(LOG_WARN,"headerlen %d larger than %d. Failing.", headerlen, max_headerlen-1); + log_fn(LOG_WARN,"headerlen %d larger than %d. Failing.", (int)headerlen, + (int)max_headerlen-1); return -1; } if(max_bodylen <= bodylen) { - log_fn(LOG_WARN,"bodylen %d larger than %d. Failing.", bodylen, max_bodylen-1); + log_fn(LOG_WARN,"bodylen %d larger than %d. Failing.", (int)bodylen, (int)max_bodylen-1); return -1; } @@ -390,14 +391,14 @@ int fetch_from_buf_http(buf_t *buf, } contentlen = i; /* if content-length is malformed, then our body length is 0. fine. */ - log_fn(LOG_DEBUG,"Got a contentlen of %d.",contentlen); + log_fn(LOG_DEBUG,"Got a contentlen of %d.",(int)contentlen); if(bodylen < contentlen) { log_fn(LOG_DEBUG,"body not all here yet."); return 0; /* not all there yet */ } if(bodylen > contentlen) { bodylen = contentlen; - log_fn(LOG_DEBUG,"bodylen reduced to %d.",bodylen); + log_fn(LOG_DEBUG,"bodylen reduced to %d.",(int)bodylen); } } /* all happy. copy into the appropriate places, and return 1 */ |