diff --git a/mfbt/tests/TestPair.cpp b/mfbt/tests/TestPair.cpp index f1fa9c554f11..c8017674e8ff 100644 --- a/mfbt/tests/TestPair.cpp +++ b/mfbt/tests/TestPair.cpp @@ -33,13 +33,27 @@ INSTANTIATE(int, int, prim1, 2 * sizeof(int)); INSTANTIATE(int, long, prim2, 2 * sizeof(long)); struct EmptyClass { explicit EmptyClass(int) {} }; -struct NonEmpty { char mC; explicit NonEmpty(int) {} }; +struct NonEmpty +{ + char mC; + explicit NonEmpty(int) + : mC('\0') + { + } +}; INSTANTIATE(int, EmptyClass, both1, sizeof(int)); INSTANTIATE(int, NonEmpty, both2, 2 * sizeof(int)); INSTANTIATE(EmptyClass, NonEmpty, both3, 1); -struct A { char dummy; explicit A(int) {} }; +struct A +{ + char dummy; + explicit A(int) + : dummy('\0') + { + } +}; struct B : A { explicit B(int aI) : A(aI) {} }; INSTANTIATE(A, A, class1, 2);