NaCl: Fix unused variable errors in lowlevellock-futex.h macros.

This commit is contained in:
Roland McGrath 2016-01-20 13:57:14 -08:00
parent b274130206
commit a3140836c8
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2016-01-20 Roland McGrath <roland@hack.frob.com>
* sysdeps/nacl/lowlevellock-futex.h
(lll_futex_wait, lll_futex_timed_wait, lll_futex_wake):
Always evaluate PRIVATE argument.
2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com> 2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com>
[BZ #19490] [BZ #19490]

View File

@ -35,7 +35,8 @@
/* Wait while *FUTEXP == VAL for an lll_futex_wake call on FUTEXP. */ /* Wait while *FUTEXP == VAL for an lll_futex_wake call on FUTEXP. */
#define lll_futex_wait(futexp, val, private) \ #define lll_futex_wait(futexp, val, private) \
(- __nacl_irt_futex.futex_wait_abs ((volatile int *) (futexp), val, NULL)) ((void) (private), \
- __nacl_irt_futex.futex_wait_abs ((volatile int *) (futexp), val, NULL))
/* Wait until a lll_futex_wake call on FUTEXP, or TIMEOUT elapses. */ /* Wait until a lll_futex_wake call on FUTEXP, or TIMEOUT elapses. */
#define lll_futex_timed_wait(futexp, val, timeout, private) \ #define lll_futex_timed_wait(futexp, val, timeout, private) \
@ -60,6 +61,7 @@
if (_err == 0) \ if (_err == 0) \
_err = __nacl_irt_futex.futex_wait_abs \ _err = __nacl_irt_futex.futex_wait_abs \
((volatile int *) (futexp), val, _to); \ ((volatile int *) (futexp), val, _to); \
(void) (private); \
-_err; \ -_err; \
}) })
@ -67,6 +69,7 @@
#define lll_futex_wake(futexp, nr, private) \ #define lll_futex_wake(futexp, nr, private) \
({ \ ({ \
int _woken; \ int _woken; \
(void) (private); \
- __nacl_irt_futex.futex_wake ((volatile int *) (futexp), nr, &_woken); \ - __nacl_irt_futex.futex_wake ((volatile int *) (futexp), nr, &_woken); \
}) })