]> granicus.if.org Git - python/commitdiff
Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h
authorJesus Cea <jcea@jcea.es>
Wed, 5 Dec 2012 13:41:11 +0000 (14:41 +0100)
committerJesus Cea <jcea@jcea.es>
Wed, 5 Dec 2012 13:41:11 +0000 (14:41 +0100)
Misc/NEWS
Python/thread_pthread.h

index cc69557ebd401c5f7d1214d1ffc8f117469dbe70..ed725fb2de6036aa49312622bfa0f7500742eab8 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,8 @@ Core and Builtins
   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
index 44e2552a8a87ea0d9709c458499fd11c951c8005..c1c92d1a15eb5175f24d73ad3af834adde759a7c 100644 (file)
@@ -284,6 +284,7 @@ PyThread_free_lock(PyThread_type_lock lock)
     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 @@ PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
     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 @@ PyThread_release_lock(PyThread_type_lock lock)
     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);