Merge branch 'jk/build-with-asan'
[gitweb.git] / builtin / describe.c
index 19eacdd170d98ea583cc2eb373247df600be24d7..89ea1cdd60a215473ecb52ff2a4ce51932e1cf6d 100644 (file)
@@ -54,8 +54,10 @@ static const char *prio_names[] = {
        N_("head"), N_("lightweight"), N_("annotated"),
 };
 
-static int commit_name_cmp(const struct commit_name *cn1,
-               const struct commit_name *cn2, const void *peeled)
+static int commit_name_cmp(const void *unused_cmp_data,
+                          const struct commit_name *cn1,
+                          const struct commit_name *cn2,
+                          const void *peeled)
 {
        return oidcmp(&cn1->peeled, peeled ? peeled : &cn2->peeled);
 }
@@ -501,7 +503,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
                return cmd_name_rev(args.argc, args.argv, prefix);
        }
 
-       hashmap_init(&names, (hashmap_cmp_fn) commit_name_cmp, 0);
+       hashmap_init(&names, (hashmap_cmp_fn) commit_name_cmp, NULL, 0);
        for_each_rawref(get_name, NULL);
        if (!names.size && !always)
                die(_("No names found, cannot describe anything."));