]> granicus.if.org Git - graphviz/commitdiff
gvpr TFA_Advance: squash warnings in calling ctype.h functions
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 8 Sep 2022 03:56:00 +0000 (20:56 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 9 Sep 2022 14:45:06 +0000 (07:45 -0700)
Some standard libraries implement the ctype.h functions as macros in a way that
triggers compiler warnings if the parameter is not int-typed.

lib/gvpr/trieFA.h

index 2bbd53926801707d8b032c8633c01da33ed517c3..36ffb4d69aaad1e209e60bf3e9f50005841dff11 100644 (file)
@@ -61,8 +61,8 @@ static short          TFA_State;
 #define TFA_Advance(C) {                                                                                                                       \
        char            c = C;                                                                                                                          \
        if (TFA_State >= 0) {                                                                                                                   \
-               if (isupper(c))                                                                                                                         \
-                       c = (char)tolower(c);                                                                                                                   \
+               if (isupper((int)c))                                                                                                                            \
+                       c = (char)tolower((int)c);                                                                                                                      \
                else if (! IN_MASK_RANGE(c)) {                                                                                          \
                        TFA_State = -1;                                                                                                                 \
                        goto TFA_done;                                                                                                                  \