diff --git a/include/VecCore/Backend/Implementation.h b/include/VecCore/Backend/Implementation.h index b0c4db5..e45ee03 100644 --- a/include/VecCore/Backend/Implementation.h +++ b/include/VecCore/Backend/Implementation.h @@ -152,7 +152,7 @@ VECCORE_FORCE_INLINE VECCORE_ATT_HOST_DEVICE T Load(Scalar const *ptr) { - T v; + T v{}; LoadStoreImplementation::Load(v, ptr); return v; } @@ -193,7 +193,7 @@ VECCORE_FORCE_INLINE VECCORE_ATT_HOST_DEVICE T Gather(S const *ptr, Index const &idx) { - T v; + T v{}; GatherScatterImplementation::template Gather(v, ptr, idx); return v; } @@ -291,7 +291,7 @@ VECCORE_FORCE_INLINE VECCORE_ATT_HOST_DEVICE T Blend(const Mask &mask, const T &src1, const T &src2) { - T v; + T v{}; MaskingImplementation::Blend(v, mask, src1, src2); return v; } diff --git a/test/interface.cc b/test/interface.cc index 9495359..a48c27f 100644 --- a/test/interface.cc +++ b/test/interface.cc @@ -7,7 +7,7 @@ TYPED_TEST_SUITE_P(VectorInterfaceTest); TYPED_TEST_P(VectorInterfaceTest, VectorSize) { using Vector_t = typename TestFixture::Vector_t; - Vector_t v; + Vector_t v{}; Vector_t &vref = v; EXPECT_TRUE(vecCore::VectorSize(v) > 0); @@ -21,7 +21,7 @@ TYPED_TEST_P(VectorInterfaceTest, VectorSize) { TYPED_TEST_P(VectorInterfaceTest, VectorSizeVariable) { using Vector_t = typename TestFixture::Vector_t; - Vector_t x; + Vector_t x{}; EXPECT_TRUE(vecCore::VectorSize(x) > 0); } @@ -29,7 +29,7 @@ TYPED_TEST_P(VectorInterfaceTest, VectorSizeVariable) { TYPED_TEST_P(VectorInterfaceTest, EarlyReturnMaxLength) { using Vector_t = typename TestFixture::Vector_t; - Vector_t x; + Vector_t x{}; // short vector, should return early if it is allowed EXPECT_EQ(vecCore::EarlyReturnAllowed(),