From efe74e765b73239be29cea32aa239c5b9ab74a95 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 3 May 2019 22:28:59 +0200 Subject: [PATCH] Fix coverty non-inititalized variables in tdec --- lib/include/srslte/phy/fec/turbodecoder_win.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/include/srslte/phy/fec/turbodecoder_win.h b/lib/include/srslte/phy/fec/turbodecoder_win.h index 349ce2d15..aceb0a07f 100644 --- a/lib/include/srslte/phy/fec/turbodecoder_win.h +++ b/lib/include/srslte/phy/fec/turbodecoder_win.h @@ -405,6 +405,11 @@ static void MAKE_FUNC(beta)(MAKE_TYPE * s, llr_t *input, llr_t *app, llr_t *pari simd_type_t *parityPtr; simd_type_t *betaPtr = (simd_type_t*) s->beta; + // Inititialize old state + for (int i = 0; i < 8; i++) { + old[i] = simd_set1(0); + } + uint32_t loop_len; for (int j=0;j<2;j++) { @@ -725,7 +730,9 @@ void MAKE_FUNC(extract_input)(llr_t *input, llr_t *systematic, llr_t *app2, llr_ simd_type_t *parity0Ptr = (simd_type_t*) parity_0; simd_type_t *parity1Ptr = (simd_type_t*) parity_1; - simd_type_t syst, parity0, parity1; + simd_type_t syst = simd_set1(0); + simd_type_t parity0 = simd_set1(0); + simd_type_t parity1 = simd_set1(0); for (int i=0;i