mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-03 19:50:34 +01: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:
		@@ -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]);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user