From 0bfd77ff5b97241e46d307d59b3a2d89995b03ce Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 06:23:56 -1000 Subject: Pass callbacks to git by address ISO C has no conversion between a function pointer and void *, so the callbacks handed through git's data pointers and the write found by dlsym stopped the pedantic half of a DEVELOPER=1 build. --- source/shared.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/shared.h') diff --git a/source/shared.h b/source/shared.h index 129cfb7..46324a1 100644 --- a/source/shared.h +++ b/source/shared.h @@ -48,6 +48,11 @@ extern int cgit_refs_cb(const struct reference *ref, void *cb_data); extern void cgit_free_commitinfo(struct commitinfo *info); extern void cgit_free_taginfo(struct taginfo *info); +/* + * A diff format callback that hands each filepair to the filepair_fn data + * points at. ISO C has no conversion between a function pointer and void *, + * so the function travels by address. + */ extern void cgit_diff_tree_cb(struct diff_queue_struct *q, struct diff_options *options, void *data); /* -- cgit