summaryrefslogtreecommitdiffstats
path: root/Modules/parsermodule.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-04-23 11:39:37 (GMT)
committerGitHub <noreply@github.com>2019-04-23 11:39:37 (GMT)
commit09415ff0ebbbe97c8cd08ac1f94673d7a49c8018 (patch)
treec49ee25cd8762638867af92177cb90bced0ec4b4 /Modules/parsermodule.c
parent574913479f26b5ff48827861bce68281be01d16e (diff)
downloadcpython-09415ff0ebbbe97c8cd08ac1f94673d7a49c8018.zip
cpython-09415ff0ebbbe97c8cd08ac1f94673d7a49c8018.tar.gz
cpython-09415ff0ebbbe97c8cd08ac1f94673d7a49c8018.tar.bz2
fix warnings by adding more const (GH-12924)
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r--Modules/parsermodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index a215c7e..0f68162 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -644,7 +644,6 @@ validate_node(node *tree)
{
int type = TYPE(tree);
int nch = NCH(tree);
- dfa *nt_dfa;
state *dfa_state;
int pos, arc;
@@ -654,7 +653,7 @@ validate_node(node *tree)
PyErr_Format(parser_error, "Unrecognized node type %d.", TYPE(tree));
return 0;
}
- nt_dfa = &_PyParser_Grammar.g_dfa[type];
+ const dfa *nt_dfa = &_PyParser_Grammar.g_dfa[type];
REQ(tree, nt_dfa->d_type);
/* Run the DFA for this nonterminal. */