From e6422e3ab21730558d7d9aaee19e52f1fcd6358d Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 22 Dec 2023 15:48:52 +0100 Subject: [PATCH] BLD: fix uninitialized variable warnings from simd/neon/memory.h The warning was this, repeated many times: ``` In file included from ../numpy/_core/src/common/simd/neon/neon.h:76: ../numpy/_core/src/common/simd/neon/memory.h:56:56: warning: variable 'a' is uninitialized when used here [-Wuninitialized] a = vld1q_lane_s32((const int32_t*)ptr, a, 0); ^ ``` [skip cirrus] [skip azp] --- numpy/_core/src/common/simd/neon/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/_core/src/common/simd/neon/memory.h b/numpy/_core/src/common/simd/neon/memory.h index 2202013f982c..e7503b822e03 100644 --- a/numpy/_core/src/common/simd/neon/memory.h +++ b/numpy/_core/src/common/simd/neon/memory.h @@ -52,7 +52,7 @@ NPYV_IMPL_NEON_MEM(f64, double) ***************************/ NPY_FINLINE npyv_s32 npyv_loadn_s32(const npy_int32 *ptr, npy_intp stride) { - int32x4_t a; + int32x4_t a = vdupq_n_s32(0); a = vld1q_lane_s32((const int32_t*)ptr, a, 0); a = vld1q_lane_s32((const int32_t*)ptr + stride, a, 1); a = vld1q_lane_s32((const int32_t*)ptr + stride*2, a, 2);