diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2011-09-08 14:31:37 +0200 |
---|---|---|
committer | Sebastian Schuberth <sschuberth@gmail.com> | 2011-09-08 17:08:57 +0200 |
commit | 1c3fac4d5e18beacb07865354b10a0bc282a49a7 (patch) | |
tree | 1a9b9968e6a3212af9f069ddfcc77b6b7ee187cb /src/filebuf.c | |
parent | 353560b440cd40c0ed6b9bffeea9b0c0cc70583b (diff) | |
download | libgit2-1c3fac4d5e18beacb07865354b10a0bc282a49a7.tar.gz |
Add casts to get rid of some warnings when filling zlib structures
Diffstat (limited to 'src/filebuf.c')
-rw-r--r-- | src/filebuf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filebuf.c b/src/filebuf.c index 70245b54d..e8c5087b7 100644 --- a/src/filebuf.c +++ b/src/filebuf.c @@ -117,18 +117,18 @@ static int write_deflate(git_filebuf *file, void *source, size_t len) if (len > 0 || file->flush_mode == Z_FINISH) { zs->next_in = source; - zs->avail_in = len; + zs->avail_in = (uInt)len; do { - int have; + size_t have; zs->next_out = file->z_buf; - zs->avail_out = file->buf_size; + zs->avail_out = (uInt)file->buf_size; result = deflate(zs, file->flush_mode); assert(result != Z_STREAM_ERROR); - have = file->buf_size - zs->avail_out; + have = file->buf_size - (size_t)zs->avail_out; if (p_write(file->fd, file->z_buf, have) < GIT_SUCCESS) return git__throw(GIT_EOSERR, "Failed to write to file"); |