mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
Fix clang11 warning
Apparently clang11 warns if you pass uninitialized memory to a function accepting a const reference. Seems fair. This change doesn't actually fix any bugs, but it silences the warning.
This commit is contained in:
parent
8342f80020
commit
b57d479d49
@ -597,7 +597,7 @@ struct TraverseMessageTypes : Context {
|
|||||||
// we don't need to check for recursion here because the next call
|
// we don't need to check for recursion here because the next call
|
||||||
// to operator() will do that and we don't generate a vtable for the
|
// to operator() will do that and we don't generate a vtable for the
|
||||||
// vector-like type itself
|
// vector-like type itself
|
||||||
T t;
|
T t{};
|
||||||
(*this)(t);
|
(*this)(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ struct TraverseMessageTypes : Context {
|
|||||||
private:
|
private:
|
||||||
template <class T, class... Ts>
|
template <class T, class... Ts>
|
||||||
void union_helper(pack<T, Ts...>) {
|
void union_helper(pack<T, Ts...>) {
|
||||||
T t;
|
T t{};
|
||||||
(*this)(t);
|
(*this)(t);
|
||||||
union_helper(pack<Ts...>{});
|
union_helper(pack<Ts...>{});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user