From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [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 [thread overview]
Message-ID: <51B71A5B.7040001@msgid.tls.msk.ru> (raw)
In-Reply-To: <1370780536-28150-1-git-send-email-sw@weilnetz.de>
[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 <sw@weilnetz.de>
> ---
> 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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>
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 [thread overview]
Message-ID: <51B71A5B.7040001@msgid.tls.msk.ru> (raw)
In-Reply-To: <1370780536-28150-1-git-send-email-sw@weilnetz.de>
[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 <sw@weilnetz.de>
> ---
> 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
next prev parent reply other threads:[~2013-06-11 12:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 12:22 [Qemu-trivial] [PATCH] audio: Replace macro GCC_ATTR by GCC_FMT_ATTR and use inline functions Stefan Weil
2013-06-09 12:22 ` [Qemu-devel] " Stefan Weil
2013-06-09 17:28 ` [Qemu-trivial] " Andreas Färber
2013-06-09 17:28 ` Andreas Färber
2013-06-10 15:38 ` [Qemu-trivial] " Michael Tokarev
2013-06-10 15:38 ` [Qemu-devel] " Michael Tokarev
2013-06-11 12:38 ` Michael Tokarev [this message]
2013-06-11 12:38 ` Michael Tokarev
2013-06-11 12:42 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
2013-06-11 12:42 ` [Qemu-devel] [Qemu-trivial] " Andreas Färber
2013-06-11 17:24 ` Stefan Weil
2013-06-11 17:24 ` [Qemu-devel] " Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B71A5B.7040001@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.