diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-11-02 16:53:20 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-11-02 16:53:21 +0900 |
| commit | b50a6701532610b5ad47a4c00adadf4ad8d4eb8b (patch) | |
| tree | d54da4d04704e35b1187bf76705dc4c95d431346 /range-diff.c | |
| parent | 9ae84d2e7fc9dddec2ab0330e13b4f5c4ab7d5d0 (diff) | |
| parent | beaa1d952b90523a167a5d3f24e0a8ce56a4afcd (diff) | |
| download | git-b50a6701532610b5ad47a4c00adadf4ad8d4eb8b.tar.xz | |
Merge branch 'jk/function-pointer-mismatches-fix' into maint-2.42
Code clean-up to please clang-18.
* jk/function-pointer-mismatches-fix:
hashmap: use expected signatures for comparison functions
Diffstat (limited to 'range-diff.c')
| -rw-r--r-- | range-diff.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/range-diff.c b/range-diff.c index 2e86063491..ca5493984a 100644 --- a/range-diff.c +++ b/range-diff.c @@ -230,16 +230,19 @@ cleanup: } static int patch_util_cmp(const void *cmp_data UNUSED, - const struct patch_util *a, - const struct patch_util *b, - const char *keydata) + const struct hashmap_entry *ha, + const struct hashmap_entry *hb, + const void *keydata) { + const struct patch_util + *a = container_of(ha, const struct patch_util, e), + *b = container_of(hb, const struct patch_util, e); return strcmp(a->diff, keydata ? keydata : b->diff); } static void find_exact_matches(struct string_list *a, struct string_list *b) { - struct hashmap map = HASHMAP_INIT((hashmap_cmp_fn)patch_util_cmp, NULL); + struct hashmap map = HASHMAP_INIT(patch_util_cmp, NULL); int i; /* First, add the patches of a to a hash map */ |
