]> granicus.if.org Git - graphviz/commitdiff
expr print: use a 'size_t' for iteration
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 16 Sep 2021 03:50:13 +0000 (20:50 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Sep 2021 04:29:41 +0000 (21:29 -0700)
Squashes a -Wsign-compare warning.

lib/expr/excc.c

index e6ab0ab20832b9ac64c9a151845d827da37103f9..626184a15620486582d4f4686407f00ebf84218b 100644 (file)
@@ -106,7 +106,6 @@ static void
 print(Excc_t* cc, Exnode_t* expr)
 {
        Print_t*        x;
-       int             i;
 
        if ((x = expr->data.print.args))
        {
@@ -118,7 +117,7 @@ print(Excc_t* cc, Exnode_t* expr)
                {
                        if (x->arg)
                        {
-                               for (i = 0; i < elementsof(x->param) && x->param[i]; i++)
+                               for (size_t i = 0; i < elementsof(x->param) && x->param[i]; i++)
                                {
                                        sfprintf(cc->ccdisc->text, ", (");
                                        gen(cc, x->param[i]);