1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

post-merge: gcc 8 warnings

This commit is contained in:
Sergei Golubchik
2019-03-16 16:03:54 +01:00
parent b64fde8f38
commit f38c352172
9 changed files with 11 additions and 15 deletions

View File

@@ -196,7 +196,7 @@ bool dd_recreate_table(THD *thd, const char *db, const char *table_name,
char path_buf[FN_REFLEN + 1]; char path_buf[FN_REFLEN + 1];
DBUG_ENTER("dd_recreate_table"); DBUG_ENTER("dd_recreate_table");
memset(&create_info, 0, sizeof(create_info)); create_info.init();
if (path) if (path)
create_info.options|= HA_LEX_CREATE_TMP_TABLE; create_info.options|= HA_LEX_CREATE_TMP_TABLE;

View File

@@ -2194,7 +2194,7 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
uint num_parts= (num_subparts ? m_file_tot_parts / num_subparts : uint num_parts= (num_subparts ? m_file_tot_parts / num_subparts :
m_file_tot_parts); m_file_tot_parts);
HA_CREATE_INFO dummy_info; HA_CREATE_INFO dummy_info;
memset(&dummy_info, 0, sizeof(dummy_info)); dummy_info.init();
/* /*
Since update_create_info() can be called from mysql_prepare_alter_table() Since update_create_info() can be called from mysql_prepare_alter_table()

View File

@@ -6976,7 +6976,6 @@ static Create_field *vers_init_sys_field(THD *thd, const char *field_name, int f
if (!f) if (!f)
return NULL; return NULL;
memset(f, 0, sizeof(*f));
f->field_name.str= field_name; f->field_name.str= field_name;
f->field_name.length= strlen(field_name); f->field_name.length= strlen(field_name);
f->charset= system_charset_info; f->charset= system_charset_info;

View File

@@ -196,9 +196,6 @@ struct vers_asof_timestamp_t
{ {
ulong type; ulong type;
MYSQL_TIME ltime; MYSQL_TIME ltime;
vers_asof_timestamp_t() :
type(SYSTEM_TIME_UNSPECIFIED)
{}
}; };
enum vers_alter_history_enum enum vers_alter_history_enum

View File

@@ -192,8 +192,8 @@ static bool compare_table_with_partition(THD *thd, TABLE *table,
DBUG_ENTER("compare_table_with_partition"); DBUG_ENTER("compare_table_with_partition");
bool metadata_equal= false; bool metadata_equal= false;
memset(&part_create_info, 0, sizeof(HA_CREATE_INFO)); part_create_info.init();
memset(&table_create_info, 0, sizeof(HA_CREATE_INFO)); table_create_info.init();
update_create_info_from_table(&table_create_info, table); update_create_info_from_table(&table_create_info, table);
/* get the current auto_increment value */ /* get the current auto_increment value */

View File

@@ -5518,7 +5518,7 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
if (file) if (file)
{ {
HA_CREATE_INFO create_info; HA_CREATE_INFO create_info;
memset(&create_info, 0, sizeof(create_info)); create_info.init();
file->update_create_info(&create_info); file->update_create_info(&create_info);
append_directory(thd, &str, "DATA", create_info.data_file_name); append_directory(thd, &str, "DATA", create_info.data_file_name);
append_directory(thd, &str, "INDEX", create_info.index_file_name); append_directory(thd, &str, "INDEX", create_info.index_file_name);

View File

@@ -11295,7 +11295,7 @@ int ha_spider::create(
error_num = ER_SPIDER_ALTER_BEFORE_UNLOCK_NUM; error_num = ER_SPIDER_ALTER_BEFORE_UNLOCK_NUM;
goto error_alter_before_unlock; goto error_alter_before_unlock;
} }
memset(&tmp_share, 0, sizeof(SPIDER_SHARE)); memset((void*)&tmp_share, 0, sizeof(SPIDER_SHARE));
tmp_share.table_name = (char*) name; tmp_share.table_name = (char*) name;
tmp_share.table_name_length = strlen(name); tmp_share.table_name_length = strlen(name);
#ifdef SPIDER_HAS_HASH_VALUE_TYPE #ifdef SPIDER_HAS_HASH_VALUE_TYPE

View File

@@ -6281,7 +6281,7 @@ int spider_open_all_tables(
} }
SPD_INIT_ALLOC_ROOT(&mem_root, 4096, 0, MYF(MY_WME)); SPD_INIT_ALLOC_ROOT(&mem_root, 4096, 0, MYF(MY_WME));
memset(&tmp_share, 0, sizeof(SPIDER_SHARE)); memset((void*)&tmp_share, 0, sizeof(SPIDER_SHARE));
memset(&tmp_connect_info, 0, memset(&tmp_connect_info, 0,
sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT); sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT);
memset(tmp_connect_info_length, 0, memset(tmp_connect_info_length, 0,
@@ -6415,7 +6415,7 @@ int spider_open_all_tables(
free_root(&mem_root, MYF(0)); free_root(&mem_root, MYF(0));
DBUG_RETURN(HA_ERR_OUT_OF_MEM); DBUG_RETURN(HA_ERR_OUT_OF_MEM);
} }
memcpy(share, &tmp_share, sizeof(*share)); memcpy((void*)share, &tmp_share, sizeof(*share));
spider_set_tmp_share_pointer(share, connect_info, spider_set_tmp_share_pointer(share, connect_info,
connect_info_length, long_info, longlong_info); connect_info_length, long_info, longlong_info);
memcpy(connect_info, &tmp_connect_info, sizeof(char *) * memcpy(connect_info, &tmp_connect_info, sizeof(char *) *

View File

@@ -253,7 +253,7 @@ int spider_trx_another_lock_tables(
sql_str.init_calc_mem(188); sql_str.init_calc_mem(188);
sql_str.length(0); sql_str.length(0);
memset((void*)&tmp_spider, 0, sizeof(ha_spider)); memset((void*)&tmp_spider, 0, sizeof(ha_spider));
memset(&tmp_share, 0, sizeof(SPIDER_SHARE)); memset((void*)&tmp_share, 0, sizeof(SPIDER_SHARE));
tmp_spider.share = &tmp_share; tmp_spider.share = &tmp_share;
tmp_spider.trx = trx; tmp_spider.trx = trx;
tmp_share.access_charset = system_charset_info; tmp_share.access_charset = system_charset_info;
@@ -2944,7 +2944,7 @@ int spider_internal_xa_commit_by_xid(
} }
} }
memset(&tmp_share, 0, sizeof(SPIDER_SHARE)); memset((void*)&tmp_share, 0, sizeof(SPIDER_SHARE));
memset(&tmp_connect_info, 0, memset(&tmp_connect_info, 0,
sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT); sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT);
spider_set_tmp_share_pointer(&tmp_share, tmp_connect_info, spider_set_tmp_share_pointer(&tmp_share, tmp_connect_info,
@@ -3177,7 +3177,7 @@ int spider_internal_xa_rollback_by_xid(
} }
} }
memset(&tmp_share, 0, sizeof(SPIDER_SHARE)); memset((void*)&tmp_share, 0, sizeof(SPIDER_SHARE));
memset(&tmp_connect_info, 0, memset(&tmp_connect_info, 0,
sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT); sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT);
spider_set_tmp_share_pointer(&tmp_share, tmp_connect_info, spider_set_tmp_share_pointer(&tmp_share, tmp_connect_info,