From: Matthew Fernandez Date: Thu, 11 Nov 2021 04:05:46 +0000 (-0800) Subject: gmlparse.y: use more appropriate stack entry count type X-Git-Tag: 2.50.0~29^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=321bb2d41d179401a2f6db5733b5114f06297a37;p=graphviz gmlparse.y: use more appropriate stack entry count type Squashes some -Wsign-conversion warnings. --- diff --git a/cmd/tools/gmlparse.y b/cmd/tools/gmlparse.y index 33db30238..e7f86f32f 100644 --- a/cmd/tools/gmlparse.y +++ b/cmd/tools/gmlparse.y @@ -36,8 +36,8 @@ static gmlnode* N; static gmledge* E; static Dt_t* L; static Dt_t** liststk; -static int liststk_sz; -static int liststk_cnt; +static size_t liststk_sz; +static size_t liststk_cnt; static void free_attr (Dt_t*d, gmlattr* p, Dtdisc_t* ds); /* forward decl */ static char* sortToStr (int sort); /* forward decl */ @@ -141,10 +141,8 @@ initstk (void) static void cleanup (void) { - int i; - if (liststk) { - for (i = 0; i < liststk_cnt; i++) + for (size_t i = 0; i < liststk_cnt; i++) dtclose (liststk[i]); free (liststk); liststk = NULL;