From ed75148ca0479c7f87e1c149f0b5f0c8dd50eb3c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 14 Mar 2025 18:28:32 +0100 Subject: [PATCH] BUILD: tools: avoid a build warning on gcc-4.8 in resolve_sym_name() A build warning is emitted with gcc-4.8 in tools.c since commit e920d73f59 ("MINOR: tools: improve symbol resolution without dl_addr") because the compiler doesn't see that is necessarily initialized. Let's just preset it. --- src/tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools.c b/src/tools.c index be1de085b..1f107b372 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5553,7 +5553,7 @@ const void *resolve_sym_name(struct buffer *buf, const char *pfx, const void *ad __decl_thread_var(static HA_SPINLOCK_T dladdr_lock); int isolated; Dl_info dli; - size_t size; + size_t size = 0; const char *fname, *p; #endif size_t dist, best_dist;