From: Stefan Behnel Date: Tue, 21 Aug 2012 19:06:25 +0000 (+0200) Subject: work around C compiler warning about unused label in optimised list/tuple looping... X-Git-Tag: 0.17b3~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b232cded0c27651be32ff5658ce39885fc9be02;p=platform%2Fupstream%2Fpython-cython.git work around C compiler warning about unused label in optimised list/tuple looping code --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 0bcdea5..025f3d6 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2132,17 +2132,20 @@ class IteratorNode(ExprNode): inc_dec = '++' code.putln("#if CYTHON_COMPILING_IN_CPYTHON") code.putln( - "%s = Py%s_GET_ITEM(%s, %s); __Pyx_INCREF(%s); %s%s;" % ( + "%s = Py%s_GET_ITEM(%s, %s); __Pyx_INCREF(%s); %s%s; %s" % ( result_name, test_name, self.py_result(), self.counter_cname, result_name, self.counter_cname, - inc_dec)) + inc_dec, + # use the error label to avoid C compiler warnings if we only use it below + code.error_goto_if_neg('0', self.pos) + )) code.putln("#else") code.putln( - "%s = PySequence_ITEM(%s, %s); %s%s; %s;" % ( + "%s = PySequence_ITEM(%s, %s); %s%s; %s" % ( result_name, self.py_result(), self.counter_cname,