1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-21263: Fix -Wclass-memaccess

Since commit f52bf92014 the type
Sql_sort is non-trivial, because it includes a data member
Bounds_checked_array<SORT_FIELD> local_sortorder.
There still is no vtable, so memset() is safe to invoke, but
we must add a cast to silence a warning in GCC 8 or later.
This commit is contained in:
Marko Mäkelä
2020-01-22 10:06:02 +02:00
parent 39e4fe8fa1
commit 6f2ca4eac1

View File

@ -300,7 +300,7 @@ public:
Sort_param()
{
memset(this, 0, sizeof(*this));
memset(reinterpret_cast<void*>(this), 0, sizeof(*this));
}
void init_for_filesort(uint sortlen, TABLE *table,
ha_rows maxrows, bool sort_positions);