Commit 2637872ba82baf9730ba0653129027a64e4f81e3

Authored by malc
1 parent d152f84c

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.
Showing 1 changed file with 4 additions and 0 deletions
audio/alsaaudio.c
... ... @@ -25,6 +25,10 @@
25 25 #include "qemu-common.h"
26 26 #include "audio.h"
27 27  
  28 +#if QEMU_GNUC_PREREQ(4, 3)
  29 +#pragma GCC diagnostic ignored "-Waddress"
  30 +#endif
  31 +
28 32 #define AUDIO_CAP "alsa"
29 33 #include "audio_int.h"
30 34  
... ...