Skip to content

Commit d9e83d2

Browse files
committed
MDEV-35152 fixup: GCC -Wmaybe-uninitialized
GCC often issues false alarms when the initialization and use of a variable is conditional, even if the predicate does not change.
1 parent 97ad2b7 commit d9e83d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/handler.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6516,9 +6516,10 @@ int ha_create_table(THD *thd, const char *path, const char *db,
65166516

65176517
bzero((char*) &index_cinfo, sizeof(index_cinfo));
65186518
index_cinfo.alter_info= &index_ainfo;
6519-
if (create_info->index_file_name)
6519+
index_file_name_end= const_cast<char*>(create_info->index_file_name);
6520+
if (index_file_name_end)
65206521
{
6521-
index_file_name_end= strmov(index_file_name, create_info->index_file_name);
6522+
index_file_name_end= strmov(index_file_name, index_file_name_end);
65226523
index_cinfo.index_file_name= index_file_name;
65236524
index_cinfo.data_file_name= index_file_name;
65246525
}

0 commit comments

Comments
 (0)