From: Erwin Janssen Date: Fri, 9 Sep 2016 22:02:58 +0000 (+0200) Subject: Change cast of strcmp in bsearch. X-Git-Tag: untagged-4431b9bde391f1b69fe5~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a155276b30da0619979d0b7d5ae22cb05b9b7d16;p=graphviz Change cast of strcmp in bsearch. Casting `strcmp` to `__compar_fn_t` doesn't work on Windows, the build fails. Instead, cast `strcmp` to the required function type: `(int(*)(const void*, const void*)` --- diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index a41f9528a..a1e5c4206 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -198,7 +198,7 @@ static void gvrender_resolve_color(gvrender_features_t * features, || (bsearch (tok, features->knowncolors, features->sz_knowncolors, - sizeof(char *), (__compar_fn_t) strcmp)) == NULL) { + sizeof(char *), (int(*)(const void*, const void*)) strcmp)) == NULL) { /* if tok was not found in known_colors */ rc = colorxlate(name, color, features->color_type); if (rc != COLOR_OK) {