Skip to content

Commit 56379c0

Browse files
committed
Issue python#16588: Silence unused-but-set warnings in Python/thread_pthread.h
1 parent 8ca1d5f commit 56379c0

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ What's New in Python 3.2.4
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h
14+
1315
- Issue #16306: Fix multiple error messages when unknown command line
1416
parameters where passed to the interpreter. Patch by Hieu Nguyen.
1517

Python/thread_pthread.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ PyThread_free_lock(PyThread_type_lock lock)
309309
sem_t *thelock = (sem_t *)lock;
310310
int status, error = 0;
311311

312+
(void) error; /* silence unused-but-set-variable warning */
312313
dprintf(("PyThread_free_lock(%p) called\n", lock));
313314

314315
if (!thelock)
@@ -341,6 +342,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
341342
int status, error = 0;
342343
struct timespec ts;
343344

345+
(void) error; /* silence unused-but-set-variable warning */
344346
dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n",
345347
lock, microseconds, intr_flag));
346348

@@ -391,6 +393,7 @@ PyThread_release_lock(PyThread_type_lock lock)
391393
sem_t *thelock = (sem_t *)lock;
392394
int status, error = 0;
393395

396+
(void) error; /* silence unused-but-set-variable warning */
394397
dprintf(("PyThread_release_lock(%p) called\n", lock));
395398

396399
status = sem_post(thelock);

0 commit comments

Comments
 (0)