From: Matthew Fernandez Date: Thu, 11 Nov 2021 01:27:23 +0000 (-0800) Subject: imagetype: squash -Wsign-compare warning X-Git-Tag: 2.50.0~30^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f77ced409b3cabef604f4bc1019420f4086b4b7;p=graphviz imagetype: squash -Wsign-compare warning --- diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 02da47cd2..63b9f5d30 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -81,10 +81,9 @@ static int imagetype (usershape_t *us) { char header[HDRLEN]; char line[200]; - int i; if (us->f && fread(header, 1, HDRLEN, us->f) == HDRLEN) { - for (i = 0; i < sizeof(knowntypes) / sizeof(knowntype_t); i++) { + for (size_t i = 0; i < sizeof(knowntypes) / sizeof(knowntype_t); i++) { if (!memcmp (header, knowntypes[i].template, knowntypes[i].size)) { us->stringtype = knowntypes[i].stringtype; us->type = knowntypes[i].type;