Skip to content

Commit 17485bf

Browse files
committed
Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h
2 parents 98cd0f2 + 56379c0 commit 17485bf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ What's New in Python 3.3.1?
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
16+
1517
- Issue #16546: Fix: ast.YieldFrom argument is now mandatory.
1618

1719
- Issue #16514: Fix regression causing a traceback when sys.path[0] is None

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)