Value-initialize the Data union member of folly::Function
[folly.git] / folly / Function.h
index b8a287dd9d0934f415fc7abfaeb1ee274df93211..ec145688b75ca0316e184db6c915277acbcc386b 100644 (file)
@@ -529,7 +529,7 @@ class Function final : private detail::function::FunctionTraits<FunctionType> {
   // invoking undefined behavior. Const-correctness is only violated when
   // `FunctionType` is a const function type (e.g., `int() const`) and `*this`
   // is the result of calling `constCastFunction`.
-  mutable Data data_;
+  mutable Data data_{};
   Call call_{&Traits::uninitCall};
   Exec exec_{&detail::function::uninitNoop};