mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
fs: fix FTBFS on GCC 8
The memset is just doing an assignment from one dereferenced pointer to another, so do an assignment to keep GCC 8 happy. Fixes: https://github.com/Zygo/bees/issues/64 Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
c21518d8ff
commit
e9aef89293
@ -701,7 +701,7 @@ namespace crucible {
|
||||
BtrfsIoctlSearchHeader::set_data(const vector<char> &v, size_t offset)
|
||||
{
|
||||
THROW_CHECK2(invalid_argument, offset, v.size(), offset + sizeof(btrfs_ioctl_search_header) <= v.size());
|
||||
memcpy(this, &v[offset], sizeof(btrfs_ioctl_search_header));
|
||||
*static_cast<btrfs_ioctl_search_header *>(this) = *reinterpret_cast<const btrfs_ioctl_search_header *>(&v[offset]);
|
||||
offset += sizeof(btrfs_ioctl_search_header);
|
||||
THROW_CHECK2(invalid_argument, offset + len, v.size(), offset + len <= v.size());
|
||||
m_data = vector<char>(&v[offset], &v[offset + len]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user