1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-20632: Fix -Wmaybe-uninitialized

Create_tmp_table::add_fields(): Initialize uneven_delta= 0
to suppress the warning from GCC 9.2.1 and 10.0.1,
and consistently indent the code with spaces.
This commit is contained in:
Marko Mäkelä
2020-03-13 06:59:34 +02:00
parent c57b207958
commit f48718be4e

View File

@@ -18345,7 +18345,6 @@ bool Create_tmp_table::add_fields(THD *thd,
List_iterator_fast<Item> li(fields); List_iterator_fast<Item> li(fields);
Item *item; Item *item;
Field **tmp_from_field= m_from_field; Field **tmp_from_field= m_from_field;
uint uneven_delta;
while (!m_with_cycle && (item= li++)) while (!m_with_cycle && (item= li++))
if (item->common_flags & IS_IN_WITH_CYCLE) if (item->common_flags & IS_IN_WITH_CYCLE)
{ {
@@ -18360,6 +18359,7 @@ bool Create_tmp_table::add_fields(THD *thd,
distinct_record_structure= true; distinct_record_structure= true;
} }
li.rewind(); li.rewind();
uint uneven_delta= 0;
while ((item=li++)) while ((item=li++))
{ {
current_counter= (((param->hidden_field_count < (fieldnr + 1)) && current_counter= (((param->hidden_field_count < (fieldnr + 1)) &&