1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-21941: Fix GCC 10 -Wmaybe-uninitialized

commit 105b879d0f introduced this
warning. The warning looks harmless, but GCC does not understand
that the initialization and the use of the variables are guarded
by the same predicate.
This commit is contained in:
Marko Mäkelä
2020-04-21 17:37:29 +03:00
parent 2a691d5744
commit 7bd3c8a4b3

View File

@ -8146,8 +8146,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
Field **f_ptr,*field;
MY_BITMAP *dropped_fields= NULL; // if it's NULL - no dropped fields
bool drop_period= false;
LEX_CSTRING period_start_name;
LEX_CSTRING period_end_name;
LEX_CSTRING period_start_name= {nullptr, 0};
LEX_CSTRING period_end_name= {nullptr, 0};
if (table->s->period.name)
{
period_start_name= table->s->period_start_field()->field_name;