Commit d034fdd0 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge commit '863b50c3' into release

parents 85453e66 863b50c3
......@@ -701,7 +701,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
PyrexTypes.c_int_type.create_from_py_utility_code(env)
code.put(Nodes.branch_prediction_macros)
code.putln('static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) {}')
code.putln('static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }')
code.putln('')
code.putln('static PyObject *%s;' % env.module_cname)
code.putln('static PyObject *%s;' % env.module_dict_cname)
......
......@@ -1841,8 +1841,8 @@ class FuncDefNode(StatNode, BlockNode):
# Scope unconditionally DECREFed on return.
code.putln("%s = %s;" % (
Naming.cur_scope_cname,
lenv.scope_class.type.cast_code("Py_None")));
code.put_incref("Py_None", py_object_type);
lenv.scope_class.type.cast_code("Py_None")))
code.put_incref("Py_None", py_object_type)
code.putln(code.error_goto(self.pos))
code.putln("} else {")
code.put_gotref(Naming.cur_scope_cname)
......
......@@ -229,7 +229,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke
PyObject* value;
#if PY_VERSION_HEX >= 0x030400A0
// we keep the method call at the end to avoid "unused" C compiler warnings
if (1) {
if ((1)) {
value = PyDict_SetDefault(d, key, default_value);
if (unlikely(!value)) return NULL;
Py_INCREF(value);
......
......@@ -161,7 +161,7 @@
#define __Pyx_TraceDeclarations
#define __Pyx_TraceFrameInit(codeobj)
// mark error label as used to avoid compiler warnings
#define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if (1); else goto_error;
#define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
#define __Pyx_TraceException()
#define __Pyx_TraceReturn(result, nogil)
......@@ -224,7 +224,7 @@
#endif
#else
// mark error label as used to avoid compiler warnings
#define __Pyx_TraceLine(lineno, nogil, goto_error) if (1); else goto_error;
#define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
#endif
/////////////// Profile ///////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment