From: Matthew Fernandez Date: Sat, 13 Nov 2021 02:53:14 +0000 (-0800) Subject: sccmap.c: use another unsigned type to squash -Wconversion warnings X-Git-Tag: 2.50.0~26^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6370e101cde5e62c754b32786e46a4136573c949;p=graphviz sccmap.c: use another unsigned type to squash -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 030eb83ca..20808c7cd 100644 --- a/cmd/tools/sccmap.c +++ b/cmd/tools/sccmap.c @@ -71,8 +71,7 @@ static void setscc(Agnode_t * n, Agraph_t * scc) static unsigned getval(Agnode_t *n) { return (((Agnodeinfo_t *) (n->base.data))->val); } -static void setval(Agnode_t * n, int v) -{ +static void setval(Agnode_t *n, unsigned v) { ((Agnodeinfo_t *) (n->base.data))->val = v; } #endif