mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34348: Consolidate cmp function declarations
Partial commit of the greater MDEV-34348 scope. MDEV-34348: MariaDB is violating clang-16 -Wcast-function-type-strict The functions queue_compare, qsort2_cmp, and qsort_cmp2 all had similar interfaces, and were used interchangable and unsafely cast to one another. This patch consolidates the functions all into the qsort_cmp2 interface. Reviewed By: ============ Marko Mäkelä <marko.makela@mariadb.com>
This commit is contained in:
@@ -57,7 +57,7 @@ extern int main(int argc,char * *argv);
|
||||
static void get_options(int *argc,char ***argv);
|
||||
static int examine_log(char * file_name,char **table_names);
|
||||
static int read_string(IO_CACHE *file,uchar* *to,uint length);
|
||||
static int file_info_compare(void *cmp_arg, void *a,void *b);
|
||||
static int file_info_compare(void *cmp_arg, const void *a, const void *b);
|
||||
static int test_if_open(struct file_info *key,element_count count,
|
||||
struct test_if_open_param *param);
|
||||
static void fix_blob_pointers(MI_INFO *isam,uchar *record);
|
||||
@@ -329,7 +329,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,
|
||||
init_tree(&tree,0,0,sizeof(file_info), file_info_compare,
|
||||
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);
|
||||
@@ -696,8 +696,8 @@ static int read_string(IO_CACHE *file, register uchar* *to, register uint length
|
||||
} /* read_string */
|
||||
|
||||
|
||||
static int file_info_compare(void* cmp_arg __attribute__((unused)),
|
||||
void *a, void *b)
|
||||
static int file_info_compare(void *cmp_arg __attribute__((unused)),
|
||||
const void *a, const void *b)
|
||||
{
|
||||
long lint;
|
||||
|
||||
|
Reference in New Issue
Block a user