Kaydet (Commit) 7ddd9c21 authored tarafından Jesus Cea's avatar Jesus Cea

Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h

üst 8c7c697e
...@@ -55,6 +55,8 @@ Core and Builtins ...@@ -55,6 +55,8 @@ Core and Builtins
HTTP servers and reduce memory usage. It's actually a backport of a Python HTTP servers and reduce memory usage. It's actually a backport of a Python
3.2 fix. Thanks to Adrien Kunysz. 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 - Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container chains ran concurrently and involved subclasses of built-in container
......
...@@ -284,6 +284,7 @@ PyThread_free_lock(PyThread_type_lock lock) ...@@ -284,6 +284,7 @@ PyThread_free_lock(PyThread_type_lock lock)
sem_t *thelock = (sem_t *)lock; sem_t *thelock = (sem_t *)lock;
int status, error = 0; int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
dprintf(("PyThread_free_lock(%p) called\n", lock)); dprintf(("PyThread_free_lock(%p) called\n", lock));
if (!thelock) if (!thelock)
...@@ -314,6 +315,7 @@ PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) ...@@ -314,6 +315,7 @@ PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
sem_t *thelock = (sem_t *)lock; sem_t *thelock = (sem_t *)lock;
int status, error = 0; int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag)); dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
do { do {
...@@ -341,6 +343,7 @@ PyThread_release_lock(PyThread_type_lock lock) ...@@ -341,6 +343,7 @@ PyThread_release_lock(PyThread_type_lock lock)
sem_t *thelock = (sem_t *)lock; sem_t *thelock = (sem_t *)lock;
int status, error = 0; int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
dprintf(("PyThread_release_lock(%p) called\n", lock)); dprintf(("PyThread_release_lock(%p) called\n", lock));
status = sem_post(thelock); status = sem_post(thelock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment