]> granicus.if.org Git - graphviz/commitdiff
gvpr: represent binding count as a size_t
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 3 Aug 2022 01:29:15 +0000 (18:29 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Aug 2022 00:03:40 +0000 (17:03 -0700)
Squashes 3 -Wsign-conversion warnings.

lib/gvpr/gprstate.c
lib/gvpr/gprstate.h

index 2bd42fa31609da232dcc1fd1ff4eceb81195dbbf..afe1e95b05bac83c9fdf3143df142a66a5e2f6a1 100644 (file)
@@ -18,6 +18,7 @@
 #include <ast/error.h>
 #include <ast/sfstr.h>
 #include <stdbool.h>
+#include <stddef.h>
 
 static int name_used;
 
@@ -95,7 +96,7 @@ findBinding (Gpr_t* state, char* fname)
  */
 void addBindings (Gpr_t* state, gvprbinding* bindings)
 {
-    int n = 0;
+    size_t n = 0;
     gvprbinding* bp = bindings;
     gvprbinding* buf;
     gvprbinding* bufp;
index a26d2d403212412d8392d05174d761f72e67dfcf..a5f5e07b28b49880f23ed899465a4d2a0c81a595 100644 (file)
@@ -18,6 +18,7 @@ extern "C" {
 #include "cgraph.h"
 #include <ast/ast.h>
 #include <stdbool.h>
+#include <stddef.h>
 #include <vmalloc/vmalloc.h>
 #include <expr/expr.h>
 #include "gvpr.h"
@@ -60,7 +61,7 @@ extern "C" {
        char **argv;
        int flags;
        gvprbinding* bindings;
-       int n_bindings;
+       size_t n_bindings;
     } Gpr_t;
 
     typedef struct {