Jesús Cea Avión added the comment:

The warning is legitimate. "error" is set to 0 at the beginning and it will be 
set to 1 if an error occurred (via CHECK_STATUS macro). But the variable 
"error" is never used in the function. So it is set, but never actually used in 
the function.

The obvious thing to do is to use the variable. For instance, with an "if 
(error) {}" do nothing construction.

Please, review the patch. I will commit it if another core developer thinks it 
is ok.

Python 2.7, 3.2, 3.3 and 3.4 affected.

It you think there is a better way of handling this, let me know.

PS: With the default compilation parameters (-O3), that empty "if" is optimized 
out, as it should.

----------
assignee:  -> jcea
keywords: +easy
nosy: +jcea
stage:  -> patch review
versions: +Python 2.7, Python 3.2, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16588>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to