Skip to content

Commit f9c597e

Browse files
authored
Merge pull request #89 from mmaka1/glk-fix-kw
klocwork: fix initialization of HiFi3 variables
2 parents a4b7b90 + 6158e0e commit f9c597e

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/audio/src_hifi3.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ static inline void fir_filter(ae_f32 *rp, const void *cp, ae_f32 *wp0,
199199
*/
200200
ae_f64 a0;
201201
ae_f64 a1;
202-
ae_f24x2 data2;
203-
ae_f24x2 coef2;
204-
ae_f24x2 d0;
205-
ae_f24x2 d1;
202+
ae_f24x2 data2 = AE_ZERO24();
203+
ae_f24x2 coef2 = AE_ZERO24();
204+
ae_f24x2 d0 = AE_ZERO24();
205+
ae_f24x2 d1 = AE_ZERO24();
206206
ae_f24x2 *coefp;
207207
ae_f24x2 *dp;
208208
ae_f24 *dp1;
@@ -332,7 +332,7 @@ void src_polyphase_stage_cir(struct src_stage_prm *s)
332332
* 16x integers
333333
* 7x address pointers,
334334
*/
335-
ae_int32x2 q;
335+
ae_int32x2 q = AE_ZERO32();
336336
ae_f32 *rp;
337337
ae_f32 *wp;
338338
int i;
@@ -448,7 +448,7 @@ void src_polyphase_stage_cir_s24(struct src_stage_prm *s)
448448
* 16x integers
449449
* 7x address pointers,
450450
*/
451-
ae_int32x2 q;
451+
ae_int32x2 q = AE_ZERO32();
452452
ae_f32 *rp;
453453
ae_f32 *wp;
454454
int i;

src/audio/volume_hifi3.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void vol_s16_to_s16(struct comp_dev *dev, struct comp_buffer *sink,
5757
ae_f32x2 volume;
5858
ae_f32x2 mult;
5959
ae_f32x2 out_sample;
60-
ae_f16x4 in_sample;
60+
ae_f16x4 in_sample = AE_ZERO16();
6161
size_t channel;
6262
int i;
6363
int limit = source->size / (dev->params.channels << 1);
@@ -105,7 +105,7 @@ static void vol_s16_to_sX(struct comp_dev *dev, struct comp_buffer *sink,
105105
ae_f32x2 volume;
106106
ae_f32x2 mult;
107107
ae_f32x2 out_sample;
108-
ae_f16x4 in_sample;
108+
ae_f16x4 in_sample = AE_ZERO16();
109109
size_t channel;
110110
uint8_t shift_left = 0;
111111
int i;
@@ -161,7 +161,7 @@ static void vol_sX_to_s16(struct comp_dev *dev, struct comp_buffer *sink,
161161
uint32_t vol_scaled[SOF_IPC_MAX_CHANNELS];
162162
ae_f32x2 volume;
163163
ae_f32x2 mult;
164-
ae_f32x2 in_sample;
164+
ae_f32x2 in_sample = AE_ZERO32();
165165
ae_f16x4 out_sample;
166166
size_t channel;
167167
uint8_t shift_left = 0;
@@ -216,7 +216,7 @@ static void vol_s24_to_s24_s32(struct comp_dev *dev, struct comp_buffer *sink,
216216
struct comp_data *cd = comp_get_drvdata(dev);
217217
uint32_t vol_scaled[SOF_IPC_MAX_CHANNELS];
218218
ae_f32x2 volume;
219-
ae_f32x2 in_sample;
219+
ae_f32x2 in_sample = AE_ZERO32();
220220
ae_f32x2 out_sample;
221221
ae_f32x2 mult;
222222
size_t channel;
@@ -271,7 +271,7 @@ static void vol_s32_to_s24_s32(struct comp_dev *dev, struct comp_buffer *sink,
271271
struct comp_data *cd = comp_get_drvdata(dev);
272272
uint32_t vol_scaled[SOF_IPC_MAX_CHANNELS];
273273
ae_f32x2 volume;
274-
ae_f32x2 in_sample;
274+
ae_f32x2 in_sample = AE_ZERO32();
275275
ae_f32x2 out_sample;
276276
ae_f32x2 mult;
277277
size_t channel;

0 commit comments

Comments
 (0)