Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
19caad02
Commit
19caad02
authored
Jul 06, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress (verbose) may-be-used-uninitialized errors.
parent
341650c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+4
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
19caad02
...
@@ -702,6 +702,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -702,6 +702,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
PyrexTypes
.
c_int_type
.
create_from_py_utility_code
(
env
)
PyrexTypes
.
c_int_type
.
create_from_py_utility_code
(
env
)
code
.
put
(
Nodes
.
branch_prediction_macros
)
code
.
put
(
Nodes
.
branch_prediction_macros
)
code
.
putln
(
'static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) {}'
)
code
.
putln
(
''
)
code
.
putln
(
''
)
code
.
putln
(
'static PyObject *%s;'
%
env
.
module_cname
)
code
.
putln
(
'static PyObject *%s;'
%
env
.
module_cname
)
code
.
putln
(
'static PyObject *%s;'
%
env
.
module_dict_cname
)
code
.
putln
(
'static PyObject *%s;'
%
env
.
module_dict_cname
)
...
...
Cython/Compiler/Nodes.py
View file @
19caad02
...
@@ -1938,6 +1938,8 @@ class FuncDefNode(StatNode, BlockNode):
...
@@ -1938,6 +1938,8 @@ class FuncDefNode(StatNode, BlockNode):
val
=
self
.
return_type
.
default_value
val
=
self
.
return_type
.
default_value
if
val
:
if
val
:
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
val
))
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
val
))
elif
not
self
.
return_type
.
is_void
:
code
.
putln
(
"__Pyx_pretend_to_initialize(&%s);"
%
Naming
.
retval_cname
)
# ----- Error cleanup
# ----- Error cleanup
if
code
.
error_label
in
code
.
labels_used
:
if
code
.
error_label
in
code
.
labels_used
:
if
not
self
.
body
.
is_terminator
:
if
not
self
.
body
.
is_terminator
:
...
@@ -1992,6 +1994,8 @@ class FuncDefNode(StatNode, BlockNode):
...
@@ -1992,6 +1994,8 @@ class FuncDefNode(StatNode, BlockNode):
err_val
=
default_retval
err_val
=
default_retval
if
err_val
is
not
None
:
if
err_val
is
not
None
:
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
err_val
))
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
err_val
))
elif
not
self
.
return_type
.
is_void
:
code
.
putln
(
"__Pyx_pretend_to_initialize(&%s);"
%
Naming
.
retval_cname
)
if
is_getbuffer_slot
:
if
is_getbuffer_slot
:
self
.
getbuffer_error_cleanup
(
code
)
self
.
getbuffer_error_cleanup
(
code
)
...
...
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