From d03b217f33db21d9af28d58d92ba02c2a2e48f5e Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Sun, 1 Nov 2020 13:22:11 +0300 Subject: Fixed building test app without debug. Compilers complained about unused variables after 37e2a3ea1bf1. --- src/test/nxt_unit_app_test.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/test') 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; } -- cgit