summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-06-20 03:50:52 +0200
committerBruno Haible <bruno@clisp.org>2019-06-20 03:50:52 +0200
commite8d62a2ae99c44c54c09efd28e39a0e562835125 (patch)
treeff7d233c76b27c5cf61fb2270e89efc7d2b0bae2
parent33d1306e3f66a367ceadc77830e87fd0643943d0 (diff)
downloadgnulib-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--ChangeLog6
-rw-r--r--tests/test-lock.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 96cbd47365..bd31e14af0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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++)