[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-trivial] [PATCH] audio: Replace macro GCC_ATTR by
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [Qemu-trivial] [PATCH] audio: Replace macro GCC_ATTR by GCC_FMT_ATTR and use inline functions |
Date: |
Tue, 11 Jun 2013 16:38:51 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Icedove/17.0 |
[Removing malc's email since it bounces]
09.06.2013 16:22, Stefan Weil wrote:
> GCC_ATTR was only used in audio_int.h, so it is now unused and
> the definition can be removed from compiler.h.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> audio/audio_int.h | 8 +++-----
> include/qemu/compiler.h | 3 ---
> 2 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/audio/audio_int.h b/audio/audio_int.h
> index b9b0676..5a6284b 100644
> --- a/audio/audio_int.h
> +++ b/audio/audio_int.h
> @@ -243,7 +243,7 @@ static inline int audio_ring_dist (int dst, int src, int
> len)
> return (dst >= src) ? (dst - src) : (len - src + dst);
> }
>
> -static void GCC_ATTR dolog (const char *fmt, ...)
> +static inline void GCC_FMT_ATTR(1, 2) dolog (const char *fmt, ...)
This change (adding `inline') causes build failure with at least with gcc-4.7:
audio/wavaudio.c: In function ‘dolog’:
audio/audio_int.h:246:100: error: function ‘dolog’ can never be inlined because
it uses variable argument lists
$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
I think the addition of inline should be dropped here and in other
similar places (the rest is ok).
I can do that myself if you want.
Alternatively these functions can be turned into varargs #defines.
Thanks,
/mjt