comparison Python/thread_pthread.h @ 80731:0adfbafe8a99 2.7

Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h
author Jesus Cea <jcea@jcea.es>
date Wed, 05 Dec 2012 14:41:11 +0100
parents ecf0ef85c72a
children a5ef439f3c9e
comparison
equal deleted inserted replaced
80720:4beb1630544f 80731:0adfbafe8a99
282 PyThread_free_lock(PyThread_type_lock lock) 282 PyThread_free_lock(PyThread_type_lock lock)
283 { 283 {
284 sem_t *thelock = (sem_t *)lock; 284 sem_t *thelock = (sem_t *)lock;
285 int status, error = 0; 285 int status, error = 0;
286 286
287 (void) error; /* silence unused-but-set-variable warning */
287 dprintf(("PyThread_free_lock(%p) called\n", lock)); 288 dprintf(("PyThread_free_lock(%p) called\n", lock));
288 289
289 if (!thelock) 290 if (!thelock)
290 return; 291 return;
291 292
312 { 313 {
313 int success; 314 int success;
314 sem_t *thelock = (sem_t *)lock; 315 sem_t *thelock = (sem_t *)lock;
315 int status, error = 0; 316 int status, error = 0;
316 317
318 (void) error; /* silence unused-but-set-variable warning */
317 dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag)); 319 dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
318 320
319 do { 321 do {
320 if (waitflag) 322 if (waitflag)
321 status = fix_status(sem_wait(thelock)); 323 status = fix_status(sem_wait(thelock));
339 PyThread_release_lock(PyThread_type_lock lock) 341 PyThread_release_lock(PyThread_type_lock lock)
340 { 342 {
341 sem_t *thelock = (sem_t *)lock; 343 sem_t *thelock = (sem_t *)lock;
342 int status, error = 0; 344 int status, error = 0;
343 345
346 (void) error; /* silence unused-but-set-variable warning */
344 dprintf(("PyThread_release_lock(%p) called\n", lock)); 347 dprintf(("PyThread_release_lock(%p) called\n", lock));
345 348
346 status = sem_post(thelock); 349 status = sem_post(thelock);
347 CHECK_STATUS("sem_post"); 350 CHECK_STATUS("sem_post");
348 } 351 }