From 581f42e7124e588217302cbc5474573261c30ed3 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 27 Aug 2020 16:34:51 +0200 Subject: [PATCH] Remove 2 -Wconversion warnings in idmap Its safe to cast to int from long since the value is always TRUE (1). --- lib/cgraph/id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.40.0