From: Magnus Jacobsson Date: Fri, 28 Aug 2020 07:48:04 +0000 (+0200) Subject: Remove 2 -Wconversion warnings in setPrefix X-Git-Tag: 2.46.0~20^2^2~93^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e70c6809bb60ff40d267fafcfc4d179b2360ca3b;p=graphviz Remove 2 -Wconversion warnings in setPrefix --- diff --git a/lib/pack/ccomps.c b/lib/pack/ccomps.c index cf9863a84..22eeb3d01 100644 --- a/lib/pack/ccomps.c +++ b/lib/pack/ccomps.c @@ -163,9 +163,9 @@ static int markFn (Agnode_t* n, int v) /* setPrefix: */ static char* -setPrefix (char* pfx, int* lenp, char* buf, int buflen) +setPrefix (char* pfx, size_t* lenp, char* buf, size_t buflen) { - int len; + size_t len; char* name; if (!pfx || !isLegal(pfx)) { @@ -202,7 +202,7 @@ Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned) Agraph_t *out = 0; Agnode_t *n; Agraph_t **ccs; - int len; + size_t len; int bnd = 10; boolean pin = FALSE; stk_t stk; @@ -294,7 +294,7 @@ Agraph_t **ccomps(Agraph_t * g, int *ncc, char *pfx) Agraph_t *out; Agnode_t *n; Agraph_t **ccs; - int len; + size_t len; int bnd = 10; stk_t stk; blk_t blk; @@ -619,7 +619,8 @@ Agraph_t **cccomps(Agraph_t * g, int *ncc, char *pfx) stk_t stk; blk_t blk; Agnode_t* base[INITBUF]; - int len, sz = sizeof(ccgraphinfo_t); + size_t len; + int sz = (int) sizeof(ccgraphinfo_t); if (agnnodes(g) == 0) { *ncc = 0;