mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 07:36:31 +01:00
alsabat: fix one uninitialized warning issue
Fix a variable uninitialized issue, adding the initialized assignment to fix it. Signed-off-by: Zhang Keqiao <keqiaox.k.zhang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
1c9adf46b8
commit
dbd4fc84f8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue