From 82ba486e5484a9dfb5608956453574542a89930d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 24 May 2024 10:06:11 +0300 Subject: [PATCH] MDEV-4742 fixup: g++-14 -Wmaybe-uninitialized to_natsort_key(): Zero-initialize also num_start. This silences a compiler warning. There is no impact on correctness, because before the first read of num_start, !n_digits would always hold and hence num_start would have been initialized. --- sql/item_strfunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index d06b3f57e42..2a9c14e7145 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -5761,7 +5761,7 @@ static NATSORT_ERR to_natsort_key(const String *in, String *out, { size_t n_digits= 0; size_t n_lead_zeros= 0; - size_t num_start; + size_t num_start= 0; size_t reserve_length= std::min( natsort_max_key_size(in->length()) + MAX_BIGINT_WIDTH + 2, max_key_size);