Commit 1749d805 authored by Stefan Behnel's avatar Stefan Behnel

work-around for C/C++ compiler warnings

parent a663be97
...@@ -3778,6 +3778,11 @@ class TryFinallyStatNode(StatNode): ...@@ -3778,6 +3778,11 @@ class TryFinallyStatNode(StatNode):
"PyObject *%s, *%s, *%s;" % Naming.exc_vars) "PyObject *%s, *%s, *%s;" % Naming.exc_vars)
code.putln( code.putln(
"int %s;" % Naming.exc_lineno_name) "int %s;" % Naming.exc_lineno_name)
exc_var_init_zero = ''.join(["%s = 0; " % var for var in Naming.exc_vars])
exc_var_init_zero += '%s = 0;' % Naming.exc_lineno_name
code.putln(exc_var_init_zero)
else:
exc_var_init_zero = None
code.use_label(catch_label) code.use_label(catch_label)
code.putln( code.putln(
"__pyx_why = 0; goto %s;" % catch_label) "__pyx_why = 0; goto %s;" % catch_label)
...@@ -3788,9 +3793,10 @@ class TryFinallyStatNode(StatNode): ...@@ -3788,9 +3793,10 @@ class TryFinallyStatNode(StatNode):
self.put_error_catcher(code, self.put_error_catcher(code,
new_error_label, i+1, catch_label) new_error_label, i+1, catch_label)
else: else:
code.putln( code.put('%s: ' % new_label)
"%s: __pyx_why = %s; goto %s;" % ( if exc_var_init_zero:
new_label, code.putln(exc_var_init_zero)
code.putln("__pyx_why = %s; goto %s;" % (
i+1, i+1,
catch_label)) catch_label))
code.put_label(catch_label) code.put_label(catch_label)
......
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