]> granicus.if.org Git - graphviz/commitdiff
processTbl: use unsigned shorts for 'r' and 'c' locals
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 13 Mar 2022 21:10:19 +0000 (14:10 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Mar 2022 05:28:30 +0000 (22:28 -0700)
Squashes two MSVC conversion warnings.

lib/common/htmltable.c

index 0aa3cec5a94e22c88fff6b919f606e54d61a126e..83c021cc70c805fa79a656d116fb448c0d925379 100644 (file)
@@ -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;