Commit 9a238cb7 authored by Lisandro Dalcin's avatar Lisandro Dalcin

Fix a few warnings from system GCC 4.2.1 in OS X 10.7.3

parent 84311ceb
...@@ -811,8 +811,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -811,8 +811,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if not method_entry.is_inherited and method_entry.final_func_cname: if not method_entry.is_inherited and method_entry.final_func_cname:
declaration = method_entry.type.declaration_code( declaration = method_entry.type.declaration_code(
method_entry.final_func_cname) method_entry.final_func_cname)
if entry.func_modifiers: if method_entry.func_modifiers:
modifiers = "%s " % ' '.join(entry.func_modifiers).upper() modifiers = "%s " % ' '.join(method_entry.func_modifiers).upper()
else: else:
modifiers = '' modifiers = ''
code.putln("static %s%s;" % (modifiers, declaration)) code.putln("static %s%s;" % (modifiers, declaration))
...@@ -2924,4 +2924,4 @@ packed_struct_utility_code = UtilityCode(proto=""" ...@@ -2924,4 +2924,4 @@ packed_struct_utility_code = UtilityCode(proto="""
#endif #endif
""", impl="", proto_block='utility_code_proto_before_types') """, impl="", proto_block='utility_code_proto_before_types')
capsule_utility_code = UtilityCode.load("Capsule") capsule_utility_code = UtilityCode.load("Capsule")
\ No newline at end of file
...@@ -4258,7 +4258,7 @@ class OverrideCheckNode(StatNode): ...@@ -4258,7 +4258,7 @@ class OverrideCheckNode(StatNode):
func_node_temp, self_arg, interned_attr_cname, err)) func_node_temp, self_arg, interned_attr_cname, err))
code.put_gotref(func_node_temp) code.put_gotref(func_node_temp)
is_builtin_function_or_method = "PyCFunction_Check(%s)" % func_node_temp is_builtin_function_or_method = "PyCFunction_Check(%s)" % func_node_temp
is_overridden = "(PyCFunction_GET_FUNCTION(%s) != (void *)&%s)" % ( is_overridden = "(PyCFunction_GET_FUNCTION(%s) != (PyCFunction)%s)" % (
func_node_temp, self.py_func.entry.func_cname) func_node_temp, self.py_func.entry.func_cname)
code.putln("if (!%s || %s) {" % (is_builtin_function_or_method, is_overridden)) code.putln("if (!%s || %s) {" % (is_builtin_function_or_method, is_overridden))
self.body.generate_execution_code(code) self.body.generate_execution_code(code)
......
...@@ -161,7 +161,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { ...@@ -161,7 +161,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
{{for type_ptr, getbuffer, releasebuffer in types}} {{for type_ptr, getbuffer, releasebuffer in types}}
{{if releasebuffer}} {{if releasebuffer}}
if (PyObject_TypeCheck(obj, {{type_ptr}})) return {{releasebuffer}}(obj, view); if (PyObject_TypeCheck(obj, {{type_ptr}})) { {{releasebuffer}}(obj, view); return; }
{{endif}} {{endif}}
{{endfor}} {{endfor}}
......
...@@ -385,10 +385,10 @@ __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) ...@@ -385,10 +385,10 @@ __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
return PyUnicode_FromFormat("<cyfunction %U at %p>", return PyUnicode_FromFormat("<cyfunction %U at %p>",
func_name, op); func_name, (void *)op);
#else #else
return PyString_FromFormat("<cyfunction %s at %p>", return PyString_FromFormat("<cyfunction %s at %p>",
PyString_AsString(func_name), op); PyString_AsString(func_name), (void *)op);
#endif #endif
} }
......
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