summaryrefslogtreecommitdiff
path: root/storage/myisam/myisamlog.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-12 16:27:19 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-14 16:33:17 +0100
commit3d2d060b626a94a19480db55feecc3020440b5c3 (patch)
tree52a1c7c7add53908023d23f90a95a764bbc23d06 /storage/myisam/myisamlog.c
parentddfa722a03ab3649783f8798df02d94a8a8ef6e3 (diff)
downloadmariadb-git-3d2d060b626a94a19480db55feecc3020440b5c3.tar.gz
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
Diffstat (limited to 'storage/myisam/myisamlog.c')
-rw-r--r--storage/myisam/myisamlog.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c
index 7ce03ca9485..f059d6f4c70 100644
--- a/storage/myisam/myisamlog.c
+++ b/storage/myisam/myisamlog.c
@@ -63,7 +63,7 @@ static int test_if_open(struct file_info *key,element_count count,
static void fix_blob_pointers(MI_INFO *isam,uchar *record);
static int test_when_accessed(struct file_info *key,element_count count,
struct st_access_param *access_param);
-static void file_info_free(struct file_info *info);
+static void file_info_free(void*, TREE_FREE, void *);
static int close_some_file(TREE *tree);
static int reopen_closed_file(TREE *tree,struct file_info *file_info);
static int find_record_with_key(struct file_info *file_info,uchar *record);
@@ -330,8 +330,7 @@ static int examine_log(char * file_name, char **table_names)
init_io_cache(&cache,file,0,READ_CACHE,start_offset,0,MYF(0));
bzero((uchar*) com_count,sizeof(com_count));
init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,
- (tree_element_free) file_info_free, NULL,
- MYF(MY_TREE_WITH_DELETE));
+ file_info_free, NULL, MYF(MY_TREE_WITH_DELETE));
(void) init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE,
0, 0, 0, 0);
@@ -751,8 +750,9 @@ static int test_when_accessed (struct file_info *key,
}
-static void file_info_free(struct file_info *fileinfo)
+static void file_info_free(void* arg, TREE_FREE mode, void *unused)
{
+ struct file_info *fileinfo= arg;
DBUG_ENTER("file_info_free");
if (update)
{