On 19 July 2016 at 13:29, BALATON Zoltan <[email protected]> wrote:
> Hello,
>
> I see this error during build now:
>
>   CC    audio/alsaaudio.o
> In file included from ~/src/qemu/include/qom/cpu.h:24:0,
>                  from ./trace/control-internal.h:15,
>                  from ./trace/control.h:281,
>                  from ./trace/generated-tracers.h:8,
>                  from ~/src/qemu/include/trace.h:4,
>                  from audio/alsaaudio.c:29:
> ~/src/qemu/include/disas/bfd.h:480:0: error: "ATTRIBUTE_UNUSED" redefined
> [-Werror]
>  #define ATTRIBUTE_UNUSED __attribute__((unused))
>  ^
> In file included from /usr/include/alsa/asoundlib.h:49:0,
>                  from audio/alsaaudio.c:25:
> /usr/include/alsa/global.h:51:0: note: this is the location of the previous
> definition
>  #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
>  ^
> cc1: all warnings being treated as errors
> ~/src/qemu/rules.mak:59: recipe for target 'audio/alsaaudio.o' failed
> make: *** [audio/alsaaudio.o] Error 1
>
> Bisected to:
>
> 4815185902971c41fcdd700fa1fc3e1d9299900f is the first bad commit
> commit 4815185902971c41fcdd700fa1fc3e1d9299900f
> Author: Lluís Vilanova <[email protected]>
> Date:   Mon Jul 11 12:53:41 2016 +0200
>
>     trace: Add per-vCPU tracing states for events with the 'vcpu' property
>
>     Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic
>     tracing state of events with the 'vcpu' property.
>
>     Signed-off-by: Lluís Vilanova <[email protected]>
>     Signed-off-by: Stefan Hajnoczi <[email protected]>
>
> Any ideas for a fix?

That's kind of unpleasant namespace pollution by the alsa
headers, but I guess we have to live with it.

The simplest fix would be to add #ifndef ATTRIBUTE_UNUSED...#endif
around the define in bfd.h, and drop the unnecessary duplicate
define from disas/arm.c.

thanks
-- PMM

Reply via email to