summaryrefslogtreecommitdiff
path: root/sql/sql_sort.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-01-22 10:06:02 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-01-22 10:06:02 +0200
commit6f2ca4eac167a12529f6062b300d89af83b310ec (patch)
treeb3d854af2bd52d7eda617c168a3450de4a9f35fd /sql/sql_sort.h
parent39e4fe8fa13ee8003a5d5aaca38094a634cd791a (diff)
downloadmariadb-git-6f2ca4eac167a12529f6062b300d89af83b310ec.tar.gz
MDEV-21263: Fix -Wclass-memaccess
Since commit f52bf92014efae6a1da9c2f26a7e3792ed5f5396 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.
Diffstat (limited to 'sql/sql_sort.h')
-rw-r--r--sql/sql_sort.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_sort.h b/sql/sql_sort.h
index 430f313631f..2c01b01b607 100644
--- a/sql/sql_sort.h
+++ b/sql/sql_sort.h
@@ -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);