diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-18 14:02:06 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-18 14:02:06 (GMT) |
commit | 0c39b1b970b5a12faa3d438f7fc7f71f293a0a44 (patch) | |
tree | 3e6f3534968ee83cf69cfc995134e2d3023078ad /Python/ast.c | |
parent | 938b0b9feef243ef1085ce10d91994d7a70f3818 (diff) | |
download | cpython-0c39b1b970b5a12faa3d438f7fc7f71f293a0a44.zip cpython-0c39b1b970b5a12faa3d438f7fc7f71f293a0a44.tar.gz cpython-0c39b1b970b5a12faa3d438f7fc7f71f293a0a44.tar.bz2 |
Initialize variables to prevent GCC warnings
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c index 2f1ae60..b48471e 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -115,7 +115,7 @@ validate_arguments(arguments_ty args) } if (!validate_args(args->kwonlyargs)) return 0; - if (args->kwarg && args->kwarg->annotation + if (args->kwarg && args->kwarg->annotation && !validate_expr(args->kwarg->annotation, Load)) { return 0; } @@ -164,6 +164,8 @@ validate_expr(expr_ty exp, expr_context_ty ctx) return 0; } check_ctx = 0; + /* set actual_ctx to prevent gcc warning */ + actual_ctx = 0; } if (check_ctx && actual_ctx != ctx) { PyErr_Format(PyExc_ValueError, "expression must have %s context but has %s instead", @@ -451,7 +453,7 @@ validate_exprs(asdl_seq *exprs, expr_context_ty ctx, int null_ok) "None disallowed in expression list"); return 0; } - + } return 1; } |