X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=index-pack.c;h=c72cbd406a7880361f262f43daff62a9f453628d;hb=444f29ce42a6de8e29a05f892f9ce5215cd38d56;hp=5dfe03ee6cbbf531a5db053fc8f8fd41b0a59aab;hpb=54e0e6edfa60f84b582112804365e207e70f44a6;p=git.git diff --git a/index-pack.c b/index-pack.c index 5dfe03ee6..c72cbd406 100644 --- a/index-pack.c +++ b/index-pack.c @@ -232,7 +232,7 @@ static void free_base_data(struct base_data *c) static void prune_base_data(struct base_data *retain) { - struct base_data *b = base_cache; + struct base_data *b; for (b = base_cache; base_cache_used > delta_base_cache_limit && b; b = b->child) { @@ -293,8 +293,8 @@ static void *unpack_entry_data(unsigned long offset, unsigned long size) static void *unpack_raw_entry(struct object_entry *obj, union delta_base *delta_base) { - unsigned char *p, c; - unsigned long size; + unsigned char *p; + unsigned long size, c; off_t base_offset; unsigned shift; void *data; @@ -312,7 +312,7 @@ static void *unpack_raw_entry(struct object_entry *obj, union delta_base *delta_ p = fill(1); c = *p; use(1); - size += (c & 0x7fUL) << shift; + size += (c & 0x7f) << shift; shift += 7; } obj->size = size; @@ -469,7 +469,7 @@ static void sha1_object(const void *data, unsigned long size, die("invalid %s", typename(type)); if (fsck_object(obj, 1, fsck_error_function)) die("Error in object"); - if (fsck_walk(obj, mark_link, 0)) + if (fsck_walk(obj, mark_link, NULL)) die("Not all child objects of %s are reachable", sha1_to_hex(obj->sha1)); if (obj->type == OBJ_TREE) {