MDEV-34348: my_hash_get_key fixes

Partial commit of the greater MDEV-34348 scope.
MDEV-34348: MariaDB is violating clang-16 -Wcast-function-type-strict

Change the type of my_hash_get_key to:
 1) Return const
 2) Change the context parameter to be const void*

Also fix casting in hash adjacent areas.

Reviewed By:
============
Marko Mäkelä <marko.makela@mariadb.com>
This commit is contained in:
Brandon Nesterenko 2024-10-26 11:34:26 -06:00
commit 840fe316d4
67 changed files with 604 additions and 617 deletions

View file

@ -648,8 +648,8 @@ void sp_update_stmt_used_routines(THD *thd, Query_tables_list *prelocking_ctx,
SQL_I_List<Sroutine_hash_entry> *src,
TABLE_LIST *belong_to_view);
extern "C" uchar* sp_sroutine_key(const uchar *ptr, size_t *plen,
my_bool first);
extern "C" const uchar *sp_sroutine_key(const void *ptr, size_t *plen,
my_bool);
/*
Routines which allow open/lock and close mysql.proc table even when