Skip to content

Commit 28abf26

Browse files
avargitster
authored andcommitted
builtin/fsck.c: don't conflate "int" and "enum" in callback
Fix a warning on AIX's xlc compiler that's been emitted since my a1aad71 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3745e26 commit 28abf26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/fsck.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ static int fsck_error_func(struct fsck_options *o,
109109

110110
static struct object_array pending;
111111

112-
static int mark_object(struct object *obj, int type, void *data, struct fsck_options *options)
112+
static int mark_object(struct object *obj, enum object_type type,
113+
void *data, struct fsck_options *options)
113114
{
114115
struct object *parent = data;
115116

0 commit comments

Comments
 (0)