mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
pcm: rate: Fix uninitialized variable warning
The recent gcc warning indicates the uninitialized variable commit_err:
pcm_rate.c:1104:6: warning: ‘commit_err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (commit_err < 0)
^
Add a proper initialization to commit_err.
Fixes: 29041c5220 ("fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
c04d7bbd6c
commit
fa2f20b71e
1 changed files with 1 additions and 1 deletions
|
|
@ -1051,7 +1051,7 @@ static int snd_pcm_rate_drain(snd_pcm_t *pcm)
|
|||
/* commit the remaining fraction (if any) */
|
||||
snd_pcm_uframes_t size, ofs, saved_avail_min;
|
||||
snd_pcm_sw_params_t sw_params;
|
||||
int commit_err;
|
||||
int commit_err = 0;
|
||||
|
||||
__snd_pcm_lock(pcm);
|
||||
/* temporarily set avail_min to one */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue