Skip to content

Commit 13e137f

Browse files
committed
Initialize uninitialized variables (cppcheck)
1 parent d602b99 commit 13e137f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

kernel/mips/cgemv_n_msa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha_r, FLOAT alpha_i,
511511
BLASLONG i, j, k, k_pref, pref_offset;
512512
FLOAT *y_org = y;
513513
FLOAT *pa0, *pa1, *pa2, *pa3;
514-
FLOAT temp_r, temp_i, res0, res1, temp0_r;
514+
FLOAT temp_r = 0.0, temp_i = 0.0, res0, res1, temp0_r;
515515
FLOAT temp0_i, temp1_r, temp1_i, temp2_r, temp2_i, temp3_r, temp3_i;
516516
v4f32 alphar, alphai;
517517
v4f32 x0, x1, y0, y1, y2, y3, x0r, x0i, y0r, y1r, y0i, y1i;

kernel/mips/dgemv_n_msa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,10 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *A,
484484
FLOAT *pa0, *pa1, *pa2, *pa3, *pa4, *pa5, *pa6, *pa7;
485485
FLOAT temp, temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
486486
v2f64 v_alpha;
487-
v2f64 x0, x1, x2, x3, y0, y1, y2, y3;
487+
v2f64 x0, x1, x2, x3, y0 = 0.0, y1 = 0.0, y2 = 0.0, y3 = 0.0;
488488
v2f64 t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15;
489489
v2f64 t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29;
490-
v2f64 t30, t31, tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7;
490+
v2f64 t30, t31, tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
491491

492492
v_alpha = COPY_DOUBLE_TO_VECTOR(alpha);
493493

kernel/mips/sgemv_n_msa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *A,
423423
FLOAT *y_org = y;
424424
FLOAT *pa0, *pa1, *pa2, *pa3, *pa4, *pa5, *pa6, *pa7;
425425
FLOAT temp, temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
426-
v4f32 v_alpha, x0, x1, y0, y1;
426+
v4f32 v_alpha, x0, x1, y0 = 0.0, y1 = 0.0;
427427
v4f32 t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15;
428-
v4f32 tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7;
428+
v4f32 tp0 = 0.0, tp1 = 0.0, tp2 = 0.0, tp3 = 0.0, tp4 = 0.0, tp5 = 0.0, tp6 = 0.0, tp7 = 0.0;
429429

430430
v_alpha = COPY_FLOAT_TO_VECTOR(alpha);
431431

0 commit comments

Comments
 (0)