mirror of
https://github.com/MariaDB/server.git
synced 2026-04-19 06:45:32 +02:00
fix gcc 8 compiler warnings
There were two newly enabled warnings: 1. cast for a function pointers. Affected sql_analyse.h, mi_write.c and ma_write.cc, mf_iocache-t.cc, mysqlbinlog.cc, encryption.cc, etc 2. memcpy/memset of nontrivial structures. Fixed as: * the warning disabled for InnoDB * TABLE, TABLE_SHARE, and TABLE_LIST got a new method reset() which does the bzero(), which is safe for these classes, but any other bzero() will still cause a warning * Table_scope_and_contents_source_st uses `TABLE_LIST *` (trivial) instead of `SQL_I_List<TABLE_LIST>` (not trivial) so it's safe to bzero now. * added casts in debug_sync.cc and sql_select.cc (for JOIN) * move assignment method for MDL_request instead of memcpy() * PARTIAL_INDEX_INTERSECT_INFO::init() instead of bzero() * remove constructor from READ_RECORD() to make it trivial * replace some memcpy() with c++ copy assignments
This commit is contained in:
parent
ddfa722a03
commit
3d2d060b62
33 changed files with 166 additions and 136 deletions
|
|
@ -2982,9 +2982,9 @@ int ha_mroonga::create_share_for_create() const
|
|||
TABLE_LIST *table_list = MRN_LEX_GET_TABLE_LIST(lex);
|
||||
MRN_DBUG_ENTER_METHOD();
|
||||
wrap_handler_for_create = NULL;
|
||||
memset(&table_for_create, 0, sizeof(TABLE));
|
||||
table_for_create.reset();
|
||||
table_share_for_create.reset();
|
||||
memset(&share_for_create, 0, sizeof(MRN_SHARE));
|
||||
memset(&table_share_for_create, 0, sizeof(TABLE_SHARE));
|
||||
if (table_share) {
|
||||
table_share_for_create.comment = table_share->comment;
|
||||
table_share_for_create.connect_string = table_share->connect_string;
|
||||
|
|
@ -14535,8 +14535,8 @@ enum_alter_inplace_result ha_mroonga::wrapper_check_if_supported_inplace_alter(
|
|||
) {
|
||||
DBUG_RETURN(HA_ALTER_ERROR);
|
||||
}
|
||||
memcpy(wrap_altered_table, altered_table, sizeof(TABLE));
|
||||
memcpy(wrap_altered_table_share, altered_table->s, sizeof(TABLE_SHARE));
|
||||
*wrap_altered_table= *altered_table;
|
||||
*wrap_altered_table_share= *altered_table->s;
|
||||
mrn_init_sql_alloc(ha_thd(), &(wrap_altered_table_share->mem_root));
|
||||
|
||||
n_keys = ha_alter_info->index_drop_count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue