]> granicus.if.org Git - graphviz/commitdiff
gvpr TFA_Advance: squash -Wconversion warning from 'tolower' return
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 8 Sep 2022 03:54:51 +0000 (20:54 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 9 Sep 2022 14:45:06 +0000 (07:45 -0700)
GCC is overly pedantic about the return type of the ctype.h functions.

lib/gvpr/trieFA.h

index 6369e4ad8a4545815efecf3edd097a211429753d..2bbd53926801707d8b032c8633c01da33ed517c3 100644 (file)
@@ -62,7 +62,7 @@ static short          TFA_State;
        char            c = C;                                                                                                                          \
        if (TFA_State >= 0) {                                                                                                                   \
                if (isupper(c))                                                                                                                         \
-                       c = tolower(c);                                                                                                                 \
+                       c = (char)tolower(c);                                                                                                                   \
                else if (! IN_MASK_RANGE(c)) {                                                                                          \
                        TFA_State = -1;                                                                                                                 \
                        goto TFA_done;                                                                                                                  \