From: Matthew Fernandez Date: Sun, 13 Mar 2022 21:10:19 +0000 (-0700) Subject: processTbl: use unsigned shorts for 'r' and 'c' locals X-Git-Tag: 4.0.0~170^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c1f58589dc9209a5f74495ae4b481ee9149c4db;p=graphviz processTbl: use unsigned shorts for 'r' and 'c' locals Squashes two MSVC conversion warnings. --- diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 0aa3cec5a..83c021cc7 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -1199,7 +1199,6 @@ static int processTbl(graph_t * g, htmltbl_t * tbl, htmlenv_t * env) pitem *rp; pitem *cp; Dt_t *cdict; - int r, c; htmlcell_t *cellp; htmlcell_t **cells; Dt_t *rows = tbl->u.p.rows; @@ -1211,7 +1210,7 @@ static int processTbl(graph_t * g, htmltbl_t * tbl, htmlenv_t * env) rp = (pitem *) dtflatten(rows); size_t cnt = 0; - r = 0; + unsigned short r = 0; while (rp) { cdict = rp->u.rp; cp = (pitem *) dtflatten(cdict); @@ -1233,7 +1232,7 @@ static int processTbl(graph_t * g, htmltbl_t * tbl, htmlenv_t * env) while (rp) { cdict = rp->u.rp; cp = (pitem *) dtflatten(cdict); - c = 0; + unsigned short c = 0; while (cp) { cellp = cp->u.cp; *cells++ = cellp;