Patchwork Fix ALSA configure check

login
register
mail settings
Submitter Paul Brook
Date July 31, 2012, 9:53 a.m.
Message ID <1343728415-14714-1-git-send-email-paul@codesourcery.com>
Download mbox | patch
Permalink /patch/174189/
State New
Headers show

Comments

Paul Brook - July 31, 2012, 9:53 a.m.
Recent gcc notice that the ASLA configure check uses an uninitialized
variable, causing spurious failures.  Adjust the testcase to avoid this.

Signed-off-by: Paul Brook <paul@codesourcery.com>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
malc - July 31, 2012, 9:58 a.m.
On Tue, 31 Jul 2012, Paul Brook wrote:

> Recent gcc notice that the ASLA configure check uses an uninitialized
> variable, causing spurious failures.  Adjust the testcase to avoid this.

http://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg02704.html

> 
> Signed-off-by: Paul Brook <paul@codesourcery.com>
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index c65b5f6..9152798 100755
> --- a/configure
> +++ b/configure
> @@ -1890,7 +1890,7 @@ for drv in $audio_drv_list; do
>      case $drv in
>      alsa)
>      audio_drv_probe $drv alsa/asoundlib.h -lasound \
> -        "snd_pcm_t **handle; return snd_pcm_close(*handle);"
> +        "snd_pcm_t *handle = NULL; return snd_pcm_close(handle);"
>      libs_softmmu="-lasound $libs_softmmu"
>      ;;
>  
>

Patch

diff --git a/configure b/configure
index c65b5f6..9152798 100755
--- a/configure
+++ b/configure
@@ -1890,7 +1890,7 @@  for drv in $audio_drv_list; do
     case $drv in
     alsa)
     audio_drv_probe $drv alsa/asoundlib.h -lasound \
-        "snd_pcm_t **handle; return snd_pcm_close(*handle);"
+        "snd_pcm_t *handle = NULL; return snd_pcm_close(handle);"
     libs_softmmu="-lasound $libs_softmmu"
     ;;