From: Matthew Fernandez Date: Tue, 29 Nov 2022 01:26:18 +0000 (-0800) Subject: twopigen: use a 'uint64_t' for infinity sentinel X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dae38d5fe4f88289d2abd18d6d1a971ef0625812;p=graphviz twopigen: use a 'uint64_t' for infinity sentinel This value is guaranteed to not be negative (an `int` multiplied by itself is non-negative) and later is compared against `uint64_t` values. So this change squashes a couple of warnings. --- diff --git a/lib/twopigen/circle.c b/lib/twopigen/circle.c index 05df0fc22..13285da9f 100644 --- a/lib/twopigen/circle.c +++ b/lib/twopigen/circle.c @@ -69,7 +69,7 @@ static bool isLeaf(Agraph_t * g, Agnode_t * n) static void initLayout(Agraph_t * g) { int nnodes = agnnodes(g); - int INF = nnodes * nnodes; + uint64_t INF = (uint64_t)(nnodes * nnodes); for (Agnode_t *n = agfstnode(g); n; n = agnxtnode(g, n)) { SCENTER(n) = INF;