Enable -Wstrict-aliasing=1 (GCC)
Fixed partially.
This commit is contained in:
+3
-1
@@ -1301,7 +1301,9 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
static_assert(sizeof(iovec) == sizeof(iovec_clone), "Weird iovec size");
|
||||
static_assert(offsetof(iovec, iov_len) == offsetof(iovec_clone, iov_len), "Weird iovec::iov_len offset");
|
||||
|
||||
const auto result = ::writev(m_fd, reinterpret_cast<const iovec*>(buffers), buf_count);
|
||||
iovec arg;
|
||||
std::memcpy(&arg, buffers, sizeof(arg));
|
||||
const auto result = ::writev(m_fd, &arg, buf_count);
|
||||
ensure(result != -1); // "file::write_gather"
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user