From: Matthew Fernandez Date: Wed, 28 Dec 2022 22:17:43 +0000 (-0800) Subject: circogen prGraph: remove unnecessary casts X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=311b1448245631659ac2f82c7a0761b1916d6376;p=graphviz circogen prGraph: remove unnecessary casts These casts were also unsafe in that they were casting pointers into a type that is smaller on, e.g. x86-64, and would truncate the pointer. --- diff --git a/lib/circogen/circular.c b/lib/circogen/circular.c index 95a858446..ea194112a 100644 --- a/lib/circogen/circular.c +++ b/lib/circogen/circular.c @@ -109,11 +109,10 @@ void prGraph(Agraph_t * g) fprintf(stderr, "%s\n", agnameof(g)); for (n = agfstnode(g); n; n = agnxtnode(g, n)) { - fprintf(stderr, "%s (%x)\n", agnameof(n), (unsigned int) n); + fprintf(stderr, "%s (%p)\n", agnameof(n), n); for (e = agfstout(g, n); e; e = agnxtout(g, e)) { fprintf(stderr, "%s", agnameof(n)); - fprintf(stderr, " -- %s (%x)\n", agnameof(aghead(e)), - (unsigned int) e); + fprintf(stderr, " -- %s (%p)\n", agnameof(aghead(e)), e); } } }