summaryrefslogtreecommitdiffstats
path: root/Parser/printgrammar.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/printgrammar.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/printgrammar.c')
-rw-r--r--Parser/printgrammar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Parser/printgrammar.c b/Parser/printgrammar.c
index dd7e6ae..7311e55 100644
--- a/Parser/printgrammar.c
+++ b/Parser/printgrammar.c
@@ -84,7 +84,7 @@ static void
printdfas(grammar *g, FILE *fp)
{
dfa *d;
- int i, j;
+ int i, j, n;
printstates(g, fp);
fprintf(fp, "static dfa dfas[%d] = {\n", g->g_ndfas);
@@ -93,7 +93,8 @@ printdfas(grammar *g, FILE *fp)
fprintf(fp, " {%d, \"%s\", %d, %d, states_%d,\n",
d->d_type, d->d_name, d->d_initial, d->d_nstates, i);
fprintf(fp, " \"");
- for (j = 0; j < NBYTES(g->g_ll.ll_nlabels); j++)
+ n = NBYTES(g->g_ll.ll_nlabels);
+ for (j = 0; j < n; j++)
fprintf(fp, "\\%03o", d->d_first[j] & 0xff);
fprintf(fp, "\"},\n");
}