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
Kirill Smelkov
cython
Commits
d5a5efb1
Commit
d5a5efb1
authored
Nov 15, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress self-assignment warning.
parent
db9591ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-2
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+8
-0
No files found.
Cython/Compiler/Nodes.py
View file @
d5a5efb1
...
...
@@ -4089,8 +4089,7 @@ class GeneratorBodyDefNode(DefNode):
lenv
.
scope_class
.
type
.
cast_code
(
'%s->closure'
%
Naming
.
generator_cname
)))
# FIXME: this silences a potential "unused" warning => try to avoid unused closures in more cases
code
.
putln
(
"if (1); else %s = %s;"
%
(
Naming
.
cur_scope_cname
,
Naming
.
cur_scope_cname
))
code
.
putln
(
"CYTHON_MAYBE_UNUSED_VAR(%s);"
%
Naming
.
cur_scope_cname
)
code
.
mark_pos
(
self
.
pos
)
code
.
putln
(
""
)
...
...
Cython/Utility/ModuleSetupCode.c
View file @
d5a5efb1
...
...
@@ -399,6 +399,14 @@
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
# if defined(__cplusplus)
template
<
class
T
>
void
CYTHON_MAYBE_UNUSED_VAR
(
const
T
&
)
{
}
# else
# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED
...
...
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