mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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:
@@ -672,8 +672,10 @@ add_ext_keyuse_for_splitting(Dynamic_array<KEYUSE_EXT> *ext_keyuses,
|
||||
|
||||
|
||||
static int
|
||||
sort_ext_keyuse(KEYUSE_EXT *a, KEYUSE_EXT *b)
|
||||
sort_ext_keyuse(const void *a_, const void *b_)
|
||||
{
|
||||
const KEYUSE_EXT *a= static_cast<const KEYUSE_EXT *>(a_);
|
||||
const KEYUSE_EXT *b= static_cast<const KEYUSE_EXT *>(b_);
|
||||
if (a->table->tablenr != b->table->tablenr)
|
||||
return (int) (a->table->tablenr - b->table->tablenr);
|
||||
if (a->key != b->key)
|
||||
|
Reference in New Issue
Block a user