[issue16588] gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h

2012-11-30 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- keywords: +patch Added file: http://bugs.python.org/file28176/z.diff ___ Python tracker ___ ___ Python

[issue16588] gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h

2012-11-30 Thread Jesús Cea Avión
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

[issue16588] gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h

2012-11-30 Thread Bruno Dupuis
New submission from Bruno Dupuis: Looks like #10951, but for another version of gcc. I get these warnings: In file included from Python/thread.c:86:0: Python/thread_pthread.h: In function ‘PyThread_free_lock’: Python/thread_pthread.h:304:17: attention : variable ‘error’ set but not used [-W