[alsa-devel] [PATCH] alsabat: fix one uninitialized warning issue
Zhang Keqiao
keqiao.zhang at intel.com
Wed Aug 30 03:26:16 CEST 2017
From: Zhang Keqiao <keqiaox.k.zhang at linux.intel.com>
Fix a variable uninitialized issue, adding the initialized assignment to fix it.
Signed-off-by: Zhang Keqiao <keqiaox.k.zhang at linux.intel.com>
---
bat/analyze.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bat/analyze.c b/bat/analyze.c
index 2b8ca61..9808b73 100644
--- a/bat/analyze.c
+++ b/bat/analyze.c
@@ -34,7 +34,7 @@ static void check_amplitude(struct bat *bat, float *buf)
int i, percent;
/* calculate average value */
- for (i = 0, sum = 0.0; i < bat->frames; i++)
+ for (i = 0, sum = 0.0, average = 0.0; i < bat->frames; i++)
sum += buf[i];
average = sum / bat->frames;
--
2.9.3
More information about the Alsa-devel
mailing list