From: Matthew Fernandez Date: Sun, 24 Jul 2022 16:50:50 +0000 (-0700) Subject: ast chrtoi: squash -Wsign-compare warning X-Git-Tag: 5.0.1~26^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b37ea3dc260306a91b4a009c0558e964684b7fc5;p=graphviz ast chrtoi: squash -Wsign-compare warning --- diff --git a/lib/ast/chrtoi.c b/lib/ast/chrtoi.c index 26c2bf278..88a613db6 100644 --- a/lib/ast/chrtoi.c +++ b/lib/ast/chrtoi.c @@ -17,16 +17,16 @@ #include #include +#include int chrtoi(const char *s) { int c; - int n; int x; char *p; c = 0; - for (n = 0; n < sizeof(int) * CHAR_BIT; n += CHAR_BIT) { + for (size_t n = 0; n < sizeof(int) * CHAR_BIT; n += CHAR_BIT) { switch (x = *((const unsigned char *) s++)) { case '\\': x = chresc(s - 1, &p);