From 43b5ecbfd7e9803dfa4ff6626856f9e3bcc3b066 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 10 Nov 2021 17:27:25 -0800 Subject: [PATCH] get_int_msb_first: use a more appropriate type to squash -Wsign-compare warning --- lib/gvc/gvusershape.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 0a78c1341..b8f5dbde2 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -127,12 +127,11 @@ static boolean get_int_lsb_first(FILE *f, size_t sz, unsigned int *val) { return TRUE; } -static boolean get_int_msb_first (FILE *f, unsigned int sz, unsigned int *val) -{ - int ch, i; +static boolean get_int_msb_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; -- 2.40.0