*/
Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned)
{
- int c_cnt = 0;
+ size_t c_cnt = 0;
char buffer[SMALLBUF];
char *name;
Agraph_t *out = 0;
Agnode_t *n;
Agraph_t **ccs;
size_t len;
- int bnd = 10;
+ size_t bnd = 10;
boolean pin = FALSE;
stk_t stk;
blk_t blk;
if (MARKED(&stk,n) || !isPinned(n))
continue;
if (!out) {
- sprintf(name + len, "%d", c_cnt);
+ sprintf(name + len, "%zu", c_cnt);
out = agsubg(g, name,1);
agbindrec(out, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); //node custom data
ccs[c_cnt] = out;
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
if (MARKED(&stk,n))
continue;
- sprintf(name + len, "%d", c_cnt);
+ sprintf(name + len, "%zu", c_cnt);
out = agsubg(g, name,1);
agbindrec(out, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); //node custom data
dfs(g, n, out, &stk);
if (name != buffer)
free(name);
if (error) {
- int i;
+ size_t i;
*ncc = 0;
for (i=0; i < c_cnt; i++) {
agclose (ccs[i]);
}
else {
ccs = RALLOC(c_cnt, ccs, Agraph_t *);
- *ncc = c_cnt;
+ *ncc = (int) c_cnt;
*pinned = pin;
}
return ccs;