From: Magnus Jacobsson Date: Thu, 27 Aug 2020 14:34:51 +0000 (+0200) Subject: Remove 2 -Wconversion warnings in idmap X-Git-Tag: 2.46.0~20^2^2~93^2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=581f42e7124e588217302cbc5474573261c30ed3;p=graphviz Remove 2 -Wconversion warnings in idmap Its safe to cast to int from long since the value is always TRUE (1). --- diff --git a/lib/cgraph/id.c b/lib/cgraph/id.c index 62fadc8e8..de6712850 100644 --- a/lib/cgraph/id.c +++ b/lib/cgraph/id.c @@ -99,7 +99,7 @@ int agmapnametoid(Agraph_t * g, int objtype, char *str, rv = 0; if (str && (str[0] != LOCALNAMEPREFIX)) { - rv = AGDISC(g, id)->map(AGCLOS(g, id), objtype, str, result, + rv = (int) AGDISC(g, id)->map(AGCLOS(g, id), objtype, str, result, createflag); if (rv) { aginternalmapinsert(g, objtype, str, *result); @@ -109,7 +109,7 @@ int agmapnametoid(Agraph_t * g, int objtype, char *str, if (createflag) { /* get a new anonymous ID, and store in the internal map */ - rv = AGDISC(g, id)->map(AGCLOS(g, id), objtype, NILstr, result, + rv = (int) AGDISC(g, id)->map(AGCLOS(g, id), objtype, NILstr, result, createflag); if (rv && str) aginternalmapinsert(g, objtype, str, *result);