core: Fix clang build
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
This commit is contained in:
parent
ca416a0fb8
commit
be1954e04c
105 changed files with 906 additions and 667 deletions
|
@ -233,7 +233,7 @@ void ResponseBuilder::PushRaw(const T& value) {
|
|||
static_assert(std::is_trivially_copyable_v<T>,
|
||||
"It's undefined behavior to use memcpy with non-trivially copyable objects");
|
||||
std::memcpy(cmdbuf + index, &value, sizeof(T));
|
||||
index += (sizeof(T) + 3) / 4; // round up to word length
|
||||
index += static_cast<std::ptrdiff_t>((sizeof(T) + 3) / 4); // round up to word length
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -390,7 +390,7 @@ void RequestParser::PopRaw(T& value) {
|
|||
static_assert(std::is_trivially_copyable_v<T>,
|
||||
"It's undefined behavior to use memcpy with non-trivially copyable objects");
|
||||
std::memcpy(&value, cmdbuf + index, sizeof(T));
|
||||
index += (sizeof(T) + 3) / 4; // round up to word length
|
||||
index += static_cast<std::ptrdiff_t>((sizeof(T) + 3) / 4); // round up to word length
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue