mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -67,10 +67,10 @@
|
||||
|
||||
extern "C" int event_queue_element_compare_q(void *, uchar *, uchar *);
|
||||
|
||||
int event_queue_element_compare_q(void *vptr, uchar* a, uchar *b)
|
||||
int event_queue_element_compare_q(void *, const void *a, const void *b)
|
||||
{
|
||||
Event_queue_element *left = (Event_queue_element *)a;
|
||||
Event_queue_element *right = (Event_queue_element *)b;
|
||||
auto left= static_cast<const Event_queue_element *>(a);
|
||||
auto right= static_cast<const Event_queue_element *>(b);
|
||||
my_time_t lhs = left->execute_at;
|
||||
my_time_t rhs = right->execute_at;
|
||||
|
||||
|
Reference in New Issue
Block a user