diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/indexer.c | 5 | ||||
-rw-r--r-- | src/pack-objects.c | 4 | ||||
-rw-r--r-- | src/pack.c | 2 | ||||
-rw-r--r-- | src/pack.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/indexer.c b/src/indexer.c index 9f55c8b2c..64a9074a1 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -632,7 +632,8 @@ static int inject_object(git_indexer_stream *idx, git_oid *id) git_buf buf = GIT_BUF_INIT; git_off_t entry_start; const void *data; - size_t len, hdr_len; + size_t len; + int hdr_len; int error; entry = git__calloc(1, sizeof(*entry)); @@ -660,7 +661,7 @@ static int inject_object(git_indexer_stream *idx, git_oid *id) /* And then the compressed object */ git_filebuf_write(&idx->pack_file, buf.ptr, buf.size); idx->pack->mwf.size += buf.size; - entry->crc = htonl(crc32(entry->crc, (unsigned char *)buf.ptr, buf.size)); + entry->crc = htonl(crc32(entry->crc, (unsigned char *)buf.ptr, (uInt)buf.size)); git_buf_free(&buf); /* Write a fake trailer so the pack functions play ball */ diff --git a/src/pack-objects.c b/src/pack-objects.c index d2774ce6a..c5286f7d3 100644 --- a/src/pack-objects.c +++ b/src/pack-objects.c @@ -26,7 +26,7 @@ struct unpacked { git_pobject *object; void *data; struct git_delta_index *index; - unsigned int depth; + int depth; }; struct tree_walk_context { @@ -659,7 +659,7 @@ static int delta_cacheable(git_packbuilder *pb, unsigned long src_size, } static int try_delta(git_packbuilder *pb, struct unpacked *trg, - struct unpacked *src, unsigned int max_depth, + struct unpacked *src, int max_depth, unsigned long *mem_usage, int *ret) { git_pobject *trg_object = trg->object; diff --git a/src/pack.c b/src/pack.c index 5df0f50b9..51fbc4e9d 100644 --- a/src/pack.c +++ b/src/pack.c @@ -372,7 +372,7 @@ static unsigned char *pack_window_open( * - each byte afterwards: low seven bits are size continuation, * with the high bit being "size continues" */ -int git_packfile__object_header(unsigned char *hdr, unsigned long size, git_otype type) +int git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type) { unsigned char *hdr_base; unsigned char c; diff --git a/src/pack.h b/src/pack.h index ddeefea1d..baad361f8 100644 --- a/src/pack.h +++ b/src/pack.h @@ -112,7 +112,7 @@ typedef struct git_packfile_stream { git_mwindow *mw; } git_packfile_stream; -int git_packfile__object_header(unsigned char *hdr, unsigned long size, git_otype type); +int git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type); int git_packfile_unpack_header( size_t *size_p, |