diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -310,6 +310,7 @@ status = sem_destroy(thelock); CHECK_STATUS("sem_destroy"); + if(error) {} /* Avoid warnings. See issue #16588 */ free((void *)thelock); } @@ -366,6 +367,8 @@ } } + if(error) {} /* Avoid warnings. See issue #16588 */ + if (status == 0) { success = PY_LOCK_ACQUIRED; } else if (intr_flag && status == EINTR) { @@ -389,6 +392,7 @@ status = sem_post(thelock); CHECK_STATUS("sem_post"); + if(error) {} /* Avoid warnings. See issue #16588 */ } #else /* USE_SEMAPHORES */