From: Matthew Fernandez Date: Sat, 13 Nov 2021 02:49:26 +0000 (-0800) Subject: sccmap.c: use an unsigned type to squash some -Wconversion warnings X-Git-Tag: 2.50.0~26^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e45bb0492d02a0c18663f3694cfbb6d78bfd1b99;p=graphviz sccmap.c: use an unsigned type to squash some -Wconversion warnings The `val` member of `Agnodeinfo_t` is unsigned and all uses of this function store the return value in an unsigned. So it seems this function always should have been declared as returning an unsigned. --- diff --git a/cmd/tools/sccmap.c b/cmd/tools/sccmap.c index fe922e3f0..030eb83ca 100644 --- a/cmd/tools/sccmap.c +++ b/cmd/tools/sccmap.c @@ -68,8 +68,7 @@ static void setscc(Agnode_t * n, Agraph_t * scc) { ((Agnodeinfo_t *) (n->base.data))->scc = scc; } -static int getval(Agnode_t * n) -{ +static unsigned getval(Agnode_t *n) { return (((Agnodeinfo_t *) (n->base.data))->val); } static void setval(Agnode_t * n, int v)