]> git.proxmox.com Git - qemu.git/commitdiff
Ignore -Waddress for alsaaudio.c
authormalc <av1474@comtv.ru>
Fri, 17 Jul 2009 01:57:04 +0000 (05:57 +0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 22 Jul 2009 20:40:52 +0000 (15:40 -0500)
/usr/include/alsa/pcm.h contains:

#define snd_pcm_sw_params_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_sw_params_t *) alloca(snd_pcm_sw_params_sizeof()); memset(*ptr, 0, snd_pcm_sw_params_sizeof()); } while (0)

The assert generates: "error: the address of 'sw_params' will always
evaluate as 'true'" which combined with -Werror prevents alsaaudio.o
from being built with certain versions of GCC.

audio/alsaaudio.c

index f1d573a8fab3b4ff3933d8835c9a19a81edac33e..d0b7cd0bd39fd16e9cbb576d0df3d14f4650003e 100644 (file)
 #include "qemu-common.h"
 #include "audio.h"
 
+#if QEMU_GNUC_PREREQ(4, 3)
+#pragma GCC diagnostic ignored "-Waddress"
+#endif
+
 #define AUDIO_CAP "alsa"
 #include "audio_int.h"