From: Matthew Fernandez Date: Sat, 25 Dec 2021 19:31:51 +0000 (-0800) Subject: mingle: cast 'name' parameter values in 'agattr' calls X-Git-Tag: 3.0.0~95^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afdf4d5920bca1aeadae37a1be4f7170b0fb8fc5;p=graphviz mingle: cast 'name' parameter values in 'agattr' calls This has no effect at present. However, when moving this code to C++ in an upcoming commit, it would trigger -Wwrite-strings warnings. This change pre-emptively prevents these warnings. --- diff --git a/cmd/mingle/minglemain.c b/cmd/mingle/minglemain.c index 4208425ce..61ac6b227 100644 --- a/cmd/mingle/minglemain.c +++ b/cmd/mingle/minglemain.c @@ -326,8 +326,8 @@ genBundleColors (pedge edge, agxbuf* xb, double maxwgt) static void export_dot (FILE* fp, int ne, pedge *edges, Agraph_t* g) { - Agsym_t* epos = agattr (g, AGEDGE, "pos", ""); - Agsym_t* esects = agattr (g, AGEDGE, "bundle", ""); + Agsym_t* epos = agattr(g, AGEDGE, (char*)"pos", ""); + Agsym_t* esects = agattr(g, AGEDGE, (char*)"bundle", ""); Agsym_t* eclrs = NULL; Agnode_t* n; Agedge_t* e; @@ -359,7 +359,7 @@ export_dot (FILE* fp, int ne, pedge *edges, Agraph_t* g) agxset (e, esects, agxbuse(&xbuf)); if (edge->wgts) { - if (!eclrs) eclrs = agattr (g, AGEDGE, "color", ""); + if (!eclrs) eclrs = agattr(g, AGEDGE, (char*)"color", ""); genBundleColors (edge, &xbuf, maxwgt); agxset (e, eclrs, agxbuse(&xbuf)); }