Skip to content

Commit

Permalink
post-merge: gcc 8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Mar 17, 2019
1 parent b64fde8 commit f38c352
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion sql/datadict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ bool dd_recreate_table(THD *thd, const char *db, const char *table_name,
char path_buf[FN_REFLEN + 1];
DBUG_ENTER("dd_recreate_table");

memset(&create_info, 0, sizeof(create_info));
create_info.init();

if (path)
create_info.options|= HA_LEX_CREATE_TMP_TABLE;
Expand Down
2 changes: 1 addition & 1 deletion sql/ha_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
m_file_tot_parts);
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()
Expand Down
1 change: 0 additions & 1 deletion sql/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6976,7 +6976,6 @@ static Create_field *vers_init_sys_field(THD *thd, const char *field_name, int f
if (!f)
return NULL;

memset(f, 0, sizeof(*f));
f->field_name.str= field_name;
f->field_name.length= strlen(field_name);
f->charset= system_charset_info;
Expand Down
3 changes: 0 additions & 3 deletions sql/mysqld.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ struct vers_asof_timestamp_t
{
ulong type;
MYSQL_TIME ltime;
vers_asof_timestamp_t() :
type(SYSTEM_TIME_UNSPECIFIED)
{}
};

enum vers_alter_history_enum
Expand Down
4 changes: 2 additions & 2 deletions sql/sql_partition_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ static bool compare_table_with_partition(THD *thd, TABLE *table,
DBUG_ENTER("compare_table_with_partition");

bool metadata_equal= false;
memset(&part_create_info, 0, sizeof(HA_CREATE_INFO));
memset(&table_create_info, 0, sizeof(HA_CREATE_INFO));
part_create_info.init();
table_create_info.init();

update_create_info_from_table(&table_create_info, table);
/* get the current auto_increment value */
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_show.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5518,7 +5518,7 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
if (file)
{
HA_CREATE_INFO create_info;
memset(&create_info, 0, sizeof(create_info));
create_info.init();
file->update_create_info(&create_info);
append_directory(thd, &str, "DATA", create_info.data_file_name);
append_directory(thd, &str, "INDEX", create_info.index_file_name);
Expand Down
2 changes: 1 addition & 1 deletion storage/spider/ha_spider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11295,7 +11295,7 @@ int ha_spider::create(
error_num = ER_SPIDER_ALTER_BEFORE_UNLOCK_NUM;
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_length = strlen(name);
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
Expand Down
4 changes: 2 additions & 2 deletions storage/spider/spd_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6281,7 +6281,7 @@ int spider_open_all_tables(
}

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,
sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT);
memset(tmp_connect_info_length, 0,
Expand Down Expand Up @@ -6415,7 +6415,7 @@ int spider_open_all_tables(
free_root(&mem_root, MYF(0));
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,
connect_info_length, long_info, longlong_info);
memcpy(connect_info, &tmp_connect_info, sizeof(char *) *
Expand Down
6 changes: 3 additions & 3 deletions storage/spider/spd_trx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int spider_trx_another_lock_tables(
sql_str.init_calc_mem(188);
sql_str.length(0);
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.trx = trx;
tmp_share.access_charset = system_charset_info;
Expand Down Expand Up @@ -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,
sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT);
spider_set_tmp_share_pointer(&tmp_share, tmp_connect_info,
Expand Down Expand Up @@ -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,
sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT);
spider_set_tmp_share_pointer(&tmp_share, tmp_connect_info,
Expand Down

0 comments on commit f38c352

Please sign in to comment.