]> granicus.if.org Git - graphviz/commitdiff
gvpr readc: cast to squash -Wconversion warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 3 Aug 2022 01:30:41 +0000 (18:30 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Aug 2022 00:03:40 +0000 (17:03 -0700)
These variables are known to be '\n' here.

lib/gvpr/parse.c

index 1ff619d6534312586b0ecde1689d69c525353132..0b64c71b6d033c6c30b0fff7d9283075e5bd6d50 100644 (file)
@@ -95,7 +95,7 @@ static int readc(Sfio_t * str, agxbuf * ostr)
                case '\n':
                    lineno++;
                    if (ostr)
-                       agxbputc(ostr, c);
+                       agxbputc(ostr, (char)c);
                    break;
                case '*':
                    switch (cc = sfgetc(str)) {
@@ -105,7 +105,7 @@ static int readc(Sfio_t * str, agxbuf * ostr)
                    case '\n':
                        lineno++;
                        if (ostr)
-                           agxbputc(ostr, cc);
+                           agxbputc(ostr, (char)cc);
                        break;
                    case '*':
                        sfungetc(str, cc);