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]
This commit is contained in:
Sergei Golubchik 2019-11-03 12:11:23 +01:00
parent e5fed3b94d
commit 3ef01d1118

View file

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