]> git.ipfire.org Git - thirdparty/git.git/blobdiff - index-pack.c
Fix some printf format warnings
[thirdparty/git.git] / index-pack.c
index cf6446fc43e008437ab03eb79f2186af3970df3d..340074fc793e8e7534bb168784a7051af6d81b34 100644 (file)
@@ -292,8 +292,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;
@@ -311,7 +311,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;
@@ -468,7 +468,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) {