summaryrefslogtreecommitdiff
path: root/builtin/fsck.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-06-01 00:05:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-06-01 20:59:15 (GMT)
commit28abf260a52b2fb79342d5010e921602e078149f (patch)
tree57ae16f5343f320cf333790e9bab50f873a731ff /builtin/fsck.c
parent3745e2693de3dd5420221782ed050cae6ebf6fec (diff)
downloadgit-28abf260a52b2fb79342d5010e921602e078149f.zip
git-28abf260a52b2fb79342d5010e921602e078149f.tar.gz
git-28abf260a52b2fb79342d5010e921602e078149f.tar.bz2
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 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>
Diffstat (limited to 'builtin/fsck.c')
-rw-r--r--builtin/fsck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 70ff958..d606c44 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -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;