]> granicus.if.org Git - graphviz/commitdiff
get_int_lsb_first: use a more appropriate type to squash -Wsign-compare warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 11 Nov 2021 01:27:24 +0000 (17:27 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Nov 2021 01:01:05 +0000 (17:01 -0800)
lib/gvc/gvusershape.c

index 63b9f5d3076c67b2def2b6d98edd7c646ee034c7..6fa4eb898555496187d5edd5df4cb647a9163eb0 100644 (file)
@@ -114,12 +114,11 @@ static int imagetype (usershape_t *us)
     return FT_NULL;
 }
     
-static boolean get_int_lsb_first (FILE *f, unsigned int sz, unsigned int *val)
-{
-    int ch, i;
+static boolean get_int_lsb_first(FILE *f, size_t sz, unsigned int *val) {
+    int ch;
 
     *val = 0;
-    for (i = 0; i < sz; i++) {
+    for (size_t i = 0; i < sz; i++) {
        ch = fgetc(f);
        if (feof(f))
            return FALSE;