diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-02-18 10:11:14 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-02-18 12:12:51 +0300 |
commit | 4af1119877d4348ecfb089863eb965aaa6571454 (patch) | |
tree | b93e0a00feb5d17319b468aaf15ff1e1317a1360 | |
parent | cfd0593f3fbab8c97bfb59c83a0616dbafd7ca9b (diff) | |
download | libatomic_ops-4af1119877d4348ecfb089863eb965aaa6571454.tar.gz |
Eliminate 'exper_n is declared but not used' compiler warning if NO_TIMES
(fix of commit cfd0593f3)
* tests/test_stack.c (output_stat): Do not declare exper_n local
variable if NO_TIMES; move exper_n to the inner scope.
-rw-r--r-- | tests/test_stack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_stack.c b/tests/test_stack.c index ab4c0a2..367cda5 100644 --- a/tests/test_stack.c +++ b/tests/test_stack.c @@ -341,11 +341,12 @@ void run_all_experiments(int max_nthreads) /* Output the performance statistic. */ void output_stat(int max_nthreads) { - int nthreads, exper_n; + int nthreads; assert(max_nthreads <= MAX_NTHREADS); for (nthreads = 1; nthreads <= max_nthreads; ++nthreads) { # ifndef NO_TIMES + int exper_n; unsigned long sum = 0; # endif |