From: Erwin Janssen Date: Thu, 1 Sep 2016 13:05:09 +0000 (+0200) Subject: Resolve one Wsign-conversion in attr.c X-Git-Tag: untagged-897b348e31e4e52e8698~1^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cc59d7395d591c84e29d47b50ce9f01a80a566b;p=graphviz 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. --- 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))