diff options
author | Bruno Haible <bruno@clisp.org> | 2019-06-20 03:50:52 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-06-20 03:50:52 +0200 |
commit | e8d62a2ae99c44c54c09efd28e39a0e562835125 (patch) | |
tree | ff7d233c76b27c5cf61fb2270e89efc7d2b0bae2 | |
parent | 33d1306e3f66a367ceadc77830e87fd0643943d0 (diff) | |
download | gnulib-e8d62a2ae99c44c54c09efd28e39a0e562835125.tar.gz |
lock tests: Avoid reference to undefined variable if !ENABLE_LOCKING.
* tests/test-lock.c (test_once): Don't reference fire_signal if
!ENABLE_LOCKING.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/test-lock.c | 2 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2019-06-20 Bruno Haible <bruno@clisp.org> + + lock tests: Avoid reference to undefined variable if !ENABLE_LOCKING. + * tests/test-lock.c (test_once): Don't reference fire_signal if + !ENABLE_LOCKING. + 2019-06-19 Bruno Haible <bruno@clisp.org> nanosleep: Relicense under LGPLv2+. diff --git a/tests/test-lock.c b/tests/test-lock.c index 166f85b13b..ca7dd62fbb 100644 --- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -647,9 +647,11 @@ test_once (void) fire_signal_state = 0; #endif +#if ENABLE_LOCKING /* Block all fire_signals. */ for (i = REPEAT_COUNT-1; i >= 0; i--) gl_rwlock_wrlock (fire_signal[i]); +#endif /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) |