diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2009-09-01 05:23:47 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2009-09-01 18:36:27 +0200 |
commit | aea9cf1011cf3c7badfd1bc49f0a27f96f234cf9 (patch) | |
tree | c66af3fe76725d159afe4f32e421c3c6a8db349c /src/common/util.c | |
parent | 075c004095e25940707aa496b49e29caefdd73e8 (diff) | |
download | tor-aea9cf1011cf3c7badfd1bc49f0a27f96f234cf9.tar.gz tor-aea9cf1011cf3c7badfd1bc49f0a27f96f234cf9.zip |
Fix compile warnings on Snow Leopard
Big thanks to nickm and arma for helping me with this!
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c index 7b9e5eb562..9dcf9fba64 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1816,7 +1816,8 @@ write_chunks_to_file_impl(const char *fname, const smartlist_t *chunks, int open_flags) { open_file_t *file = NULL; - int fd, result; + int fd; + ssize_t result; fd = start_writing_to_file(fname, open_flags, 0600, &file); if (fd<0) return -1; @@ -1901,7 +1902,7 @@ read_file_to_str(const char *filename, int flags, struct stat *stat_out) int fd; /* router file */ struct stat statbuf; char *string; - int r; + ssize_t r; int bin = flags & RFTS_BIN; tor_assert(filename); @@ -1960,7 +1961,7 @@ read_file_to_str(const char *filename, int flags, struct stat *stat_out) * match for size. */ int save_errno = errno; log_warn(LD_FS,"Could read only %d of %ld bytes of file \"%s\".", - r, (long)statbuf.st_size,filename); + (int)r, (long)statbuf.st_size,filename); tor_free(string); close(fd); errno = save_errno; |