summaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2011-02-22 20:15:44 +0000
committerBrett Cannon <bcannon@gmail.com>2011-02-22 20:15:44 +0000
commitb94767ff44edf5d461d7cb1c8eb5160f83886358 (patch)
treeb43b482e765b0383b3326779f6815e72b2bacccb /Parser
parent79da6b7075a3d51ae042e77a2afca827e7bce435 (diff)
downloadcpython-git-b94767ff44edf5d461d7cb1c8eb5160f83886358.tar.gz
Issue #8914: fix various warnings from the Clang static analyzer v254.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c3
-rw-r--r--Parser/pgenmain.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 7636a54bbd..2251cacf74 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -127,7 +127,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
{
parser_state *ps;
node *n;
- int started = 0, handling_import = 0, handling_with = 0;
+ int started = 0;
if ((ps = PyParser_New(g, start)) == NULL) {
fprintf(stderr, "no mem for new parser\n");
@@ -154,7 +154,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
}
if (type == ENDMARKER && started) {
type = NEWLINE; /* Add an extra newline */
- handling_with = handling_import = 0;
started = 0;
/* Add the right number of dedent tokens,
except if a certain flag is given --
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 4b7b55a4f1..52b8380c33 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -29,6 +29,8 @@ int Py_IgnoreEnvironmentFlag;
/* Forward */
grammar *getgrammar(char *filename);
+void Py_Exit(int) _Py_NO_RETURN;
+
void
Py_Exit(int sts)
{