summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-07-17 05:57:04 +0400
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-22 15:40:52 -0500
commit6f40c941bd9782fec6af7759f031b49b939009b1 (patch)
tree3e1a5b30e80e532648e5711fd76198641ec64afd
parent3b72617c9a8039fb6a08dd0b212bb916cc597d54 (diff)
downloadqemu-6f40c941bd9782fec6af7759f031b49b939009b1.tar.gz
Ignore -Waddress for alsaaudio.c
/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.
-rw-r--r--audio/alsaaudio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index f1d573a8fa..d0b7cd0bd3 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -25,6 +25,10 @@
#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"