Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a05fcd3c
Commit
a05fcd3c
authored
Oct 10, 2019
by
Dong-hee Na
Committed by
Victor Stinner
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-38425: Fix ‘res’ may be used uninitialized warning (GH-16688)
parent
7bb14316
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
Parser/asdl_c.py
Parser/asdl_c.py
+2
-1
Python/Python-ast.c
Python/Python-ast.c
+2
-1
No files found.
Parser/asdl_c.py
View file @
a05fcd3c
...
...
@@ -1197,7 +1197,6 @@ PyObject* PyAST_mod2obj(mod_ty t)
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
{
mod_ty res;
PyObject *req_type[3];
const char * const req_name[] = {"Module", "Expression", "Interactive"};
int isinstance;
...
...
@@ -1223,6 +1222,8 @@ mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
req_name[mode], _PyType_Name(Py_TYPE(ast)));
return NULL;
}
mod_ty res = NULL;
if (obj2ast_mod(ast, &res, arena) != 0)
return NULL;
else
...
...
Python/Python-ast.c
View file @
a05fcd3c
...
...
@@ -10250,7 +10250,6 @@ PyObject* PyAST_mod2obj(mod_ty t)
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
mod_ty
PyAST_obj2mod
(
PyObject
*
ast
,
PyArena
*
arena
,
int
mode
)
{
mod_ty
res
;
PyObject
*
req_type
[
3
];
const
char
*
const
req_name
[]
=
{
"Module"
,
"Expression"
,
"Interactive"
};
int
isinstance
;
...
...
@@ -10276,6 +10275,8 @@ mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
req_name
[
mode
],
_PyType_Name
(
Py_TYPE
(
ast
)));
return
NULL
;
}
mod_ty
res
=
NULL
;
if
(
obj2ast_mod
(
ast
,
&
res
,
arena
)
!=
0
)
return
NULL
;
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment