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:
@@ -84,7 +84,7 @@ typedef struct st_stack
|
||||
/****************************************************************************
|
||||
** 'standard' quicksort with the following extensions:
|
||||
**
|
||||
** Can be compiled with the qsort2_cmp compare function
|
||||
** Can be compiled with the qsort_cmp2 compare function
|
||||
** Store ranges on stack to avoid recursion
|
||||
** Use insert sort on small ranges
|
||||
** Optimize for sorting of pointers (used often by MySQL)
|
||||
@@ -92,7 +92,7 @@ typedef struct st_stack
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef QSORT_EXTRA_CMP_ARGUMENT
|
||||
qsort_t my_qsort2(void *base_ptr, size_t count, size_t size, qsort2_cmp cmp,
|
||||
qsort_t my_qsort2(void *base_ptr, size_t count, size_t size, qsort_cmp2 cmp,
|
||||
void *cmp_argument)
|
||||
#else
|
||||
qsort_t my_qsort(void *base_ptr, size_t count, size_t size, qsort_cmp cmp)
|
||||
|
Reference in New Issue
Block a user