From 852534dc99d636ef291f62670613442b2a47c6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 20 Jan 2022 08:24:03 +0200 Subject: [PATCH] MDEV-26519 fixup: GCC 11 -Og -Wmaybe-uninitialized GCC does not understand that the variable have_ndv determines whether the variable ndv_ll is initialized. Let us add a redundant initialization to pacify GCC. --- sql/opt_histogram_json.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc index f2be4e5c0fb..de0b4ebab50 100644 --- a/sql/opt_histogram_json.cc +++ b/sql/opt_histogram_json.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2021, MariaDB Corporation. + Copyright (c) 2021, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -611,7 +611,7 @@ int Histogram_json_hb::parse_bucket(json_engine_t *je, Field *field, bool have_ndv= false; double size_d; - longlong ndv_ll; + longlong ndv_ll= 0; StringBuffer<128> value_buf; int rc;