Patchwork configure: Fix build with ALSA audio driver

login
register
mail settings
Submitter Stefan Weil
Date July 15, 2012, 1:49 p.m.
Message ID <1342360153-26487-1-git-send-email-sw@weilnetz.de>
Download mbox | patch
Permalink /patch/171066/
State Accepted
Headers show

Comments

Stefan Weil - July 15, 2012, 1:49 p.m.
Since commit 417c9d72d48275d19c60861896efd4962d21aca2,
all configure tests normally run with -Werror.

Some of these tests now fail because they raised a compiler warning.

Here a build breakage for ALSA (configure --audio-drv-list=alsa) is fixed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

One of the buildbot jobs should be configured with all sound options:

--audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda
--audio-drv-list=alsa,sdl,oss,esd,pa
--enable-mixemu

That would have detected this bug (and more potential bugs in the future).

Regards

Stefan W.



 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefan Hajnoczi - July 16, 2012, 11:07 a.m.
On Sun, Jul 15, 2012 at 03:49:13PM +0200, Stefan Weil wrote:
> One of the buildbot jobs should be configured with all sound options:
> 
> --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda
> --audio-drv-list=alsa,sdl,oss,esd,pa
> --enable-mixemu
> 
> That would have detected this bug (and more potential bugs in the future).

Daniel, please could you add these ./configure options to the qemu.git
buildbot?

I have tested on the yuzuki buildbot with Stefan Weil's patch applied.
Yuzuki has the library headers installed so we can build it all and get
better coverage.

Thanks,
Stefan
Daniel Gollub - July 18, 2012, 5:38 a.m.
Hi,

On Monday, July 16, 2012 12:07:58 PM Stefan Hajnoczi wrote:
> On Sun, Jul 15, 2012 at 03:49:13PM +0200, Stefan Weil wrote:
> > One of the buildbot jobs should be configured with all sound options:
> > 
> > --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda
> > --audio-drv-list=alsa,sdl,oss,esd,pa
> > --enable-mixemu
> > 
> > That would have detected this bug (and more potential bugs in the
> > future).
> Daniel, please could you add these ./configure options to the qemu.git
> buildbot?


I'll apply that tomorrow or the day after tomorrow once the build regression 
from last night got fixed. Otherwise we would not get notified if other build 
factories break due to this change ...

> 
> I have tested on the yuzuki buildbot with Stefan Weil's patch applied.
> Yuzuki has the library headers installed so we can build it all and get
> better coverage.


Best Regards,
Daniel

Patch

diff --git a/configure b/configure
index 0a3896e..f745cc2 100755
--- a/configure
+++ b/configure
@@ -1888,7 +1888,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);"
+        "return snd_pcm_close((snd_pcm_t *)0);"
     libs_softmmu="-lasound $libs_softmmu"
     ;;