From: Matthew Fernandez Date: Thu, 11 Nov 2021 01:27:24 +0000 (-0800) Subject: get_int_lsb_first: use a more appropriate type to squash -Wsign-compare warning X-Git-Tag: 2.50.0~30^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bad8679e4cbe7909f4e78f8e119f8477e7202f42;p=graphviz get_int_lsb_first: use a more appropriate type to squash -Wsign-compare warning --- diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 63b9f5d30..6fa4eb898 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -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;