From 3ef01d1118c9258e888a7ff1934a4c3ec92e888e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 3 Nov 2019 12:11:23 +0100 Subject: [PATCH] compilation failure, gcc 8.3.0 storage/innobase/log/log0recv.cc|1760 col 35 error| 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'struct recv_t' with no trivial copy-assignment [-Werror=class-memaccess] --- storage/innobase/log/log0recv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 364fa92666d..2749b46b380 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -1757,7 +1757,7 @@ inline void recv_sys_t::add(mlog_id_t type, const page_id_t page_id, recv_t* recv= new (mem_heap_alloc(heap, sizeof(recv_t) + chunk_len)) recv_t(len, type, lsn, end_lsn); - memcpy(recv + 1, body, chunk_len); + memcpy((void*)(recv + 1), body, chunk_len); recs.log.append(recv); if (UNIV_LIKELY(len == chunk_len))