mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-34348: Miscellaneous fixes
Partial commit of the greater MDEV-34348 scope. MDEV-34348: MariaDB is violating clang-16 -Wcast-function-type-strict Various additional fixes, each too small to put into their own commit. Reviewed By: ============ Marko Mäkelä <marko.makela@mariadb.com>
This commit is contained in:
parent
3c785499da
commit
78d7bb1d27
3 changed files with 6 additions and 7 deletions
|
@ -129,8 +129,6 @@ struct list_node :public Sql_alloc
|
|||
}
|
||||
};
|
||||
|
||||
typedef bool List_eq(void *a, void *b);
|
||||
|
||||
extern MYSQL_PLUGIN_IMPORT list_node end_of_list;
|
||||
|
||||
class base_list :public Sql_alloc
|
||||
|
@ -301,11 +299,12 @@ public:
|
|||
inline void **head_ref() { return first != &end_of_list ? &first->info : 0; }
|
||||
inline bool is_empty() { return first == &end_of_list ; }
|
||||
inline list_node *last_ref() { return &end_of_list; }
|
||||
inline bool add_unique(void *info, List_eq *eq)
|
||||
template <typename T= void>
|
||||
inline bool add_unique(T *info, bool (*eq)(T *a, T *b))
|
||||
{
|
||||
list_node *node= first;
|
||||
for (;
|
||||
node != &end_of_list && (!(*eq)(node->info, info));
|
||||
node != &end_of_list && (!(*eq)(static_cast<T *>(node->info), info));
|
||||
node= node->next) ;
|
||||
if (node == &end_of_list)
|
||||
return push_back(info);
|
||||
|
@ -513,7 +512,7 @@ public:
|
|||
inline void prepend(List<T> *list) { base_list::prepend(list); }
|
||||
inline void disjoin(List<T> *list) { base_list::disjoin(list); }
|
||||
inline bool add_unique(T *a, bool (*eq)(T *a, T *b))
|
||||
{ return base_list::add_unique(a, (List_eq *)eq); }
|
||||
{ return base_list::add_unique<T>(a, eq); }
|
||||
inline bool copy(const List<T> *list, MEM_ROOT *root)
|
||||
{ return base_list::copy(list, root); }
|
||||
void delete_elements(void)
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef void (*Udf_func_clear)(UDF_INIT *, uchar *, uchar *);
|
|||
typedef void (*Udf_func_add)(UDF_INIT *, UDF_ARGS *, uchar *, uchar *);
|
||||
typedef void (*Udf_func_deinit)(UDF_INIT*);
|
||||
typedef my_bool (*Udf_func_init)(UDF_INIT *, UDF_ARGS *, char *);
|
||||
typedef void (*Udf_func_any)();
|
||||
typedef void *Udf_func_any;
|
||||
typedef double (*Udf_func_double)(UDF_INIT *, UDF_ARGS *, uchar *, uchar *);
|
||||
typedef longlong (*Udf_func_longlong)(UDF_INIT *, UDF_ARGS *, uchar *,
|
||||
uchar *);
|
||||
|
|
|
@ -183,7 +183,7 @@ static int tina_init_func(void *p)
|
|||
init_tina_psi_keys();
|
||||
#endif
|
||||
|
||||
tina_hton= (handlerton *)p;
|
||||
tina_hton= static_cast<handlerton *>(p);
|
||||
mysql_mutex_init(csv_key_mutex_tina, &tina_mutex, MY_MUTEX_INIT_FAST);
|
||||
(void) my_hash_init(csv_key_memory_tina_share, &tina_open_tables,
|
||||
Lex_ident_table::charset_info(), 32, 0, 0, tina_get_key,
|
||||
|
|
Loading…
Reference in a new issue