Fixes: prevent compiler reporting UB, hazptr_array move operator, empty array test
[folly.git] / folly / experimental / hazptr / test / HazptrTest.cpp
index 8468ad579da04ba9df2b603ee695f28f46be3b04..75d4669a2e4066ce9a782dc95fd760b46f947640 100644 (file)
@@ -360,7 +360,7 @@ TEST_F(HazptrTest, Array) {
     // Protect object
     hptr[9].reset(x);
     // Empty array
-    hazptr_array<10> h;
+    hazptr_array<10> h(nullptr);
     // Move assignment
     h = std::move(hptr);
     // Retire object