Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4569467

Browse files
committed
Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h
2 parents 550ab51 + 17485bf commit 4569467

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.4.0 Alpha 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
14+
1315
- Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation
1416
failure.
1517

Python/thread_pthread.h

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

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

308309
if (!thelock)
@@ -335,6 +336,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
335336
int status, error = 0;
336337
struct timespec ts;
337338

339+
(void) error; /* silence unused-but-set-variable warning */
338340
dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n",
339341
lock, microseconds, intr_flag));
340342

@@ -385,6 +387,7 @@ PyThread_release_lock(PyThread_type_lock lock)
385387
sem_t *thelock = (sem_t *)lock;
386388
int status, error = 0;
387389

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

390393
status = sem_post(thelock);

0 commit comments

Comments
 (0)