summaryrefslogtreecommitdiffstats
path: root/Parser/pgenmain.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-09-05 07:10:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-09-05 07:10:23 (GMT)
commit67c719b34b86ba073e6f25cfa3e1994ecb16b888 (patch)
tree7874b80f9e183ee99596bf9a6dfce6dee2489feb /Parser/pgenmain.c
parent2ee44f7f5584b343ee26fb2be46ffde571a5e63d (diff)
downloadcpython-67c719b34b86ba073e6f25cfa3e1994ecb16b888.zip
cpython-67c719b34b86ba073e6f25cfa3e1994ecb16b888.tar.gz
cpython-67c719b34b86ba073e6f25cfa3e1994ecb16b888.tar.bz2
Silenced some warnings about comparison between signed and unsigned integer
expressions.
Diffstat (limited to 'Parser/pgenmain.c')
-rw-r--r--Parser/pgenmain.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 017a4f9..0f055d6 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -96,10 +96,11 @@ getgrammar(char *filename)
fprintf(stderr, "Parsing error %d, line %d.\n",
err.error, err.lineno);
if (err.text != NULL) {
- size_t i;
+ size_t len;
+ int i;
fprintf(stderr, "%s", err.text);
- i = strlen(err.text);
- if (i == 0 || err.text[i-1] != '\n')
+ len = strlen(err.text);
+ if (len == 0 || err.text[len-1] != '\n')
fprintf(stderr, "\n");
for (i = 0; i < err.offset; i++) {
if (err.text[i] == '\t')