From 7cc59d7395d591c84e29d47b50ce9f01a80a566b Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Thu, 1 Sep 2016 15:05:09 +0200 Subject: [PATCH] Resolve one Wsign-conversion in attr.c This cast that resolves this warning does not change the sign of `sz`, because the if statement above it makes sure it isn't a negative number. --- lib/cgraph/attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cgraph/attr.c b/lib/cgraph/attr.c index 3e2202196..d7f7f8c78 100644 --- a/lib/cgraph/attr.c +++ b/lib/cgraph/attr.c @@ -193,7 +193,7 @@ static Agrec_t *agmakeattrs(Agraph_t * context, void *obj) sz = topdictsize(obj); if (sz < MINATTR) sz = MINATTR; - rec->str = agalloc(agraphof(obj), sz * sizeof(char *)); + rec->str = agalloc(agraphof(obj), (size_t) sz * sizeof(char *)); /* doesn't call agxset() so no obj-modified callbacks occur */ for (sym = (Agsym_t *) dtfirst(datadict); sym; sym = (Agsym_t *) dtnext(datadict, sym)) -- 2.40.0