From 89ed89e895a77249a56ee179a803c5d408788683 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 1 Jul 2022 21:18:03 +0200 Subject: [PATCH] BUILD: debug: re-export thread_dump_state Building with threads and without thread dump (e.g. macos, freebsd) warns that thread_dump_state is unused. This happened in fact with recentcommit 1229ef312 ("MINOR: wdt: do not rely on threads_to_dump anymore"). The solution would be to mark it unused, but after a second thought, it can be convenient to keep it exported to help debug crashes, so let's export it again. It's just not referenced in include files since it's not needed outside. --- src/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index 23b72b62f..8d6210828 100644 --- a/src/debug.c +++ b/src/debug.c @@ -54,7 +54,7 @@ * adds 1<<16 and sets the lowest 15 bits to the ID of the next thread to * dump + 1. Only used when USE_THREAD_DUMP is set. */ -static volatile unsigned int thread_dump_state = 0; +volatile unsigned int thread_dump_state = 0; unsigned int debug_commands_issued = 0; /* dumps a backtrace of the current thread that is appended to buffer .