From 7ddd9c21da9ffb47a9b669f584d4666deca23d1c Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 5 Dec 2012 14:41:11 +0100 Subject: Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h --- Misc/NEWS | 2 ++ Python/thread_pthread.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index cc69557..ed725fb 100644 --- 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 diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 44e2552..c1c92d1 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -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); -- cgit v0.12