]> granicus.if.org Git - graphviz/commitdiff
squash a -Wsign-compare warning in a gvplugin.c loop
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 29 May 2021 21:02:42 +0000 (14:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Jun 2021 01:57:34 +0000 (18:57 -0700)
lib/gvc/gvplugin.c

index b3d54f84c2a7548742bf74f4335f6923ac598ee3..3df6a865cc931844cf79bec2fde63ad2dbbe6a53 100644 (file)
@@ -49,9 +49,7 @@ static char *api_names[] = { APIS };    /* "render", "layout", ... */
 /* translate a string api name to its type, or -1 on error */
 api_t gvplugin_api(const char *str)
 {
-    int api;
-
-    for (api = 0; api < ARRAY_SIZE(api_names); api++) {
+    for (size_t api = 0; api < ARRAY_SIZE(api_names); api++) {
         if (strcmp(str, api_names[api]) == 0)
             return (api_t) api;
     }