* [PATCH] alsabat: fix one uninitialized warning issue
@ 2017-08-30 1:26 Zhang Keqiao
2017-08-30 8:19 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Keqiao @ 2017-08-30 1:26 UTC (permalink / raw)
To: alsa-devel; +Cc: keqiao.zhang, Zhang Keqiao
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;
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] alsabat: fix one uninitialized warning issue
2017-08-30 1:26 [PATCH] alsabat: fix one uninitialized warning issue Zhang Keqiao
@ 2017-08-30 8:19 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-08-30 8:19 UTC (permalink / raw)
To: Zhang Keqiao; +Cc: alsa-devel, Zhang Keqiao
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-30 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 1:26 [PATCH] alsabat: fix one uninitialized warning issue Zhang Keqiao
2017-08-30 8:19 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.