]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/fsck.c: don't conflate "int" and "enum" in callback
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 1 Jun 2021 00:05:59 +0000 (02:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jun 2021 20:59:15 +0000 (05:59 +0900)
Fix a warning on AIX's xlc compiler that's been emitted since my
a1aad71601a (fsck.h: use "enum object_type" instead of "int",
2021-03-28):

    "builtin/fsck.c", line 805.32: 1506-068 (W) Operation between
    types "int(*)(struct object*,enum object_type,void*,struct
    fsck_options*)" and "int(*)(struct object*,int,void*,struct
    fsck_options*)" is not allowed.

I.e. it complains about us assigning a function with a prototype "int"
where we're expecting "enum object_type".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c

index 70ff95837aee4f40271a4de596c63dd4fa02b18f..d606c4444d4b68bed718827264ddfa6c8345b8ca 100644 (file)
@@ -109,7 +109,8 @@ static int fsck_error_func(struct fsck_options *o,
 
 static struct object_array pending;
 
-static int mark_object(struct object *obj, int type, void *data, struct fsck_options *options)
+static int mark_object(struct object *obj, enum object_type type,
+                      void *data, struct fsck_options *options)
 {
        struct object *parent = data;