diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-11-01 13:22:11 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-11-01 13:22:11 +0300 |
commit | d03b217f33db21d9af28d58d92ba02c2a2e48f5e (patch) | |
tree | 8a4b21926ff833be5c83eece867f1b19775a2fe9 /src/test | |
parent | bbe4b97ca159bbff19e3c507635e0d81a68c695e (diff) | |
download | unit-d03b217f33db21d9af28d58d92ba02c2a2e48f5e.tar.gz unit-d03b217f33db21d9af28d58d92ba02c2a2e48f5e.tar.bz2 |
Fixed building test app without debug.
Compilers complained about unused variables after 37e2a3ea1bf1.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/nxt_unit_app_test.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/nxt_unit_app_test.c b/src/test/nxt_unit_app_test.c index 5b2521e8..b6dd13d2 100644 --- a/src/test/nxt_unit_app_test.c +++ b/src/test/nxt_unit_app_test.c @@ -72,7 +72,13 @@ main(int argc, char **argv) for (i = 0; i < thread_count - 1; i++) { err = pthread_join(threads[i], NULL); - nxt_unit_debug(ctx, "join thread #%d: %d", i, err); + if (nxt_fast_path(err == 0)) { + nxt_unit_debug(ctx, "join thread #%d", i); + + } else { + nxt_unit_alert(ctx, "pthread_join(#%d) failed: %s (%d)", + i, strerror(err), err); + } } nxt_unit_free(ctx, threads); @@ -132,7 +138,7 @@ worker(void *main_ctx) nxt_unit_done(ctx); - return NULL; + return (void *) (intptr_t) rc; } |