Code

add NORETURN_PTR for function pointers
[git.git] / builtin-fsck.c
index d0f48cdd2aed47b9ef124b8f925a7a7d1621c850..c58b0e337ed434ffb90cfb5c80540531d94a4a6a 100644 (file)
@@ -104,7 +104,7 @@ static int mark_object(struct object *obj, int type, void *data)
 
 static void mark_object_reachable(struct object *obj)
 {
-       mark_object(obj, OBJ_ANY, 0);
+       mark_object(obj, OBJ_ANY, NULL);
 }
 
 static int traverse_one_object(struct object *obj, struct object *parent)
@@ -292,7 +292,7 @@ static int fsck_sha1(const unsigned char *sha1)
                fprintf(stderr, "Checking %s %s\n",
                        typename(obj->type), sha1_to_hex(obj->sha1));
 
-       if (fsck_walk(obj, mark_used, 0))
+       if (fsck_walk(obj, mark_used, NULL))
                objerror(obj, "broken links");
        if (fsck_object(obj, check_strict, fsck_error_func))
                return -1;
@@ -589,6 +589,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
        struct alternate_object_database *alt;
 
        errors_found = 0;
+       read_replace_refs = 0;
 
        argc = parse_options(argc, argv, prefix, fsck_opts, fsck_usage, 0);
        if (write_lost_and_found) {