[alsa-devel] [PATCH] alsabat: fix one uninitialized warning issue
From: Zhang Keqiao keqiaox.k.zhang@linux.intel.com
Fix a variable uninitialized issue, adding the initialized assignment to fix it.
Signed-off-by: Zhang Keqiao keqiaox.k.zhang@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;
On Wed, 30 Aug 2017 03:26:16 +0200, Zhang Keqiao wrote:
From: Zhang Keqiao keqiaox.k.zhang@linux.intel.com
Fix a variable uninitialized issue, adding the initialized assignment to fix it.
Signed-off-by: Zhang Keqiao keqiaox.k.zhang@linux.intel.com
Applied, thanks.
Takashi
participants (2)
-
Takashi Iwai
-
Zhang Keqiao