[Python-checkins] cpython (2.7): Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h
jesus.cea
python-checkins at python.org
Wed Dec 5 14:42:19 CET 2012
http://hg.python.org/cpython/rev/0adfbafe8a99
changeset: 80731:0adfbafe8a99
branch: 2.7
parent: 80720:4beb1630544f
user: Jesus Cea <jcea at jcea.es>
date: Wed Dec 05 14:41:11 2012 +0100
summary:
Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h
files:
Misc/NEWS | 2 ++
Python/thread_pthread.h | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,8 @@
HTTP servers and reduce memory usage. It's actually a backport of a Python
3.2 fix. Thanks to Adrien Kunysz.
+- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
+
- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -284,6 +284,7 @@
sem_t *thelock = (sem_t *)lock;
int status, error = 0;
+ (void) error; /* silence unused-but-set-variable warning */
dprintf(("PyThread_free_lock(%p) called\n", lock));
if (!thelock)
@@ -314,6 +315,7 @@
sem_t *thelock = (sem_t *)lock;
int status, error = 0;
+ (void) error; /* silence unused-but-set-variable warning */
dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
do {
@@ -341,6 +343,7 @@
sem_t *thelock = (sem_t *)lock;
int status, error = 0;
+ (void) error; /* silence unused-but-set-variable warning */
dprintf(("PyThread_release_lock(%p) called\n", lock));
status = sem_post(thelock);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list