From 6370e101cde5e62c754b32786e46a4136573c949 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 12 Nov 2021 18:53:14 -0800 Subject: [PATCH] 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. --- cmd/tools/sccmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.40.0