From: malc Date: Fri, 17 Jul 2009 01:57:04 +0000 (+0400) Subject: Ignore -Waddress for alsaaudio.c X-Git-Tag: v0.11.0-rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f40c941bd9782fec6af7759f031b49b939009b1;p=thirdparty%2Fqemu.git 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. --- diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index f1d573a8fab..d0b7cd0bd39 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"