Skip to content
Permalink
Browse files
MDEV-21263: Fix -Wclass-memaccess
Since commit f52bf92 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.
  • Loading branch information
dr-m committed Jan 22, 2020
1 parent 39e4fe8 commit 6f2ca4e
Showing 1 changed file with 1 addition and 1 deletion.
@@ -300,7 +300,7 @@ class Sort_param {

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);

0 comments on commit 6f2ca4e

Please sign in to comment.