]> granicus.if.org Git - graphviz/commitdiff
gvpr readLine: squash -Wconversion warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 28 Jul 2022 02:13:15 +0000 (19:13 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 2 Aug 2022 04:33:31 +0000 (21:33 -0700)
`c` is guaranteed to fit in a char here.

lib/gvpr/actions.c

index 0839e2052e70893ba5904c58fa805189040fa930..d0f201a9dbdf314be222da413a1c5655b1f15c78 100644 (file)
@@ -719,9 +719,9 @@ char *readLine(Expr_t * ex, int fd)
     }
     agxbinit(&tmps, 0, NULL);
     while ((c = sfgetc(sp)) > 0 && c != '\n')
-       agxbputc(&tmps, c);
+       agxbputc(&tmps, (char)c);
     if (c == '\n')
-       agxbputc(&tmps, c);
+       agxbputc(&tmps, (char)c);
     line = exstring(ex, agxbuse(&tmps));
     agxbfree(&tmps);
     return line;