summaryrefslogtreecommitdiff
path: root/src/filebuf.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-09-08 14:20:19 -0700
committerVicent Martí <tanoku@gmail.com>2011-09-08 14:20:19 -0700
commit3f3f6225f8237e974b135de30eaac731c929936e (patch)
tree74e79db35482c110aa9bf50cb06ce23dc045275b /src/filebuf.c
parent564f0f7be1d962fdb3bdc42e7e47db9c1ce960ec (diff)
parentbac47f1ff8c6684671c67000c747a6b0a7f2c6dc (diff)
downloadlibgit2-3f3f6225f8237e974b135de30eaac731c929936e.tar.gz
Merge pull request #391 from sschuberth/development
Warning fixes
Diffstat (limited to 'src/filebuf.c')
-rw-r--r--src/filebuf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/filebuf.c b/src/filebuf.c
index 6d398a7db..e8c5087b7 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -116,24 +116,24 @@ static int write_deflate(git_filebuf *file, void *source, size_t len)
z_stream *zs = &file->zs;
if (len > 0 || file->flush_mode == Z_FINISH) {
- zs->next_in = (void *)source;
- zs->avail_in = len;
+ zs->next_in = source;
+ 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);
+ 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");
- } while (zs->avail_out == 0);
+ } while (zs->avail_out == 0);
assert(zs->avail_in == 0);