From 67ec0eef4b448d32152897c8bbc20190f06d5b3e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 16 Feb 2020 08:54:19 -0800 Subject: Add casts for MSVC10. This is kivikakk's commit 62166fe3b6b07068ed4c4207113e3c4b060ad4a8 in cmark-gfm. --- src/references.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/references.c') diff --git a/src/references.c b/src/references.c index 4830689..623006a 100644 --- a/src/references.c +++ b/src/references.c @@ -82,14 +82,14 @@ refcmp(const void *p1, const void *p2) { static int refsearch(const void *label, const void *p2) { cmark_reference *ref = *(cmark_reference **)p2; - return labelcmp(label, ref->label); + return labelcmp((const unsigned char *)label, ref->label); } static void sort_references(cmark_reference_map *map) { unsigned int i = 0, last = 0, size = map->size; cmark_reference *r = map->refs, **sorted = NULL; - sorted = map->mem->calloc(size, sizeof(cmark_reference *)); + sorted = (cmark_reference **)map->mem->calloc(size, sizeof(cmark_reference *)); while (r) { sorted[i++] = r; r = r->next; @@ -125,7 +125,7 @@ cmark_reference *cmark_reference_lookup(cmark_reference_map *map, if (!map->sorted) sort_references(map); - ref = bsearch(norm, map->sorted, map->size, sizeof(cmark_reference *), + ref = (cmark_reference **)bsearch(norm, map->sorted, map->size, sizeof(cmark_reference *), refsearch); map->mem->free(norm); return ref ? ref[0] : NULL; -- cgit v1.2.3