From: Stefan Weil <weil@mail.berlios.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 2/2] Replace remaining gcc format attributes by macro GCC_FMT_ATTR (format checking)
Date: Fri, 22 Oct 2010 12:33:58 +0200 [thread overview]
Message-ID: <4CC16896.3090609@mail.berlios.de> (raw)
In-Reply-To: <1286996067-25440-2-git-send-email-weil@mail.berlios.de>
Am 13.10.2010 20:54, schrieb Stefan Weil:
> Replace the remaining format attribute printf by macro
> GCC_FMT_ATTR which uses gnu_printf (if supported).
>
> v2
> * Removal of dyngen specific code is now done in a separate patch.
> * Handle attribute in new ui/spice-display.c, too.
>
> Cc: Blue Swirl<blauwirbel@gmail.com>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
> ---
> cpu-all.h | 2 +-
> ui/spice-display.c | 3 +--
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/cpu-all.h b/cpu-all.h
> index 67a3266..11edddc 100644
> --- a/cpu-all.h
> +++ b/cpu-all.h
> @@ -773,7 +773,7 @@ void cpu_dump_statistics (CPUState *env, FILE *f,
> int flags);
>
> void QEMU_NORETURN cpu_abort(CPUState *env, const char *fmt, ...)
> - __attribute__ ((__format__ (__printf__, 2, 3)));
> + GCC_FMT_ATTR(2, 3);
> extern CPUState *first_cpu;
> extern CPUState *cpu_single_env;
>
> diff --git a/ui/spice-display.c b/ui/spice-display.c
> index 6702dfd..7b4f5c1 100644
> --- a/ui/spice-display.c
> +++ b/ui/spice-display.c
> @@ -29,8 +29,7 @@
>
> static int debug = 0;
>
> -static void __attribute__((format(printf,2,3)))
> -dprint(int level, const char *fmt, ...)
> +static void GCC_FMT_ATTR(2, 3) dprint(int level, const char *fmt, ...)
> {
> va_list args;
>
>
Can these two patches be applied to qemu master, or is there still
something missing?
They are needed for additional format checks.
Regards,
Stefan
next prev parent reply other threads:[~2010-10-22 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 18:54 [Qemu-devel] [PATCH 1/2] Remove special handling of system include files (no longer needed) Stefan Weil
2010-10-13 18:54 ` [Qemu-devel] [PATCH 2/2] Replace remaining gcc format attributes by macro GCC_FMT_ATTR (format checking) Stefan Weil
2010-10-22 10:33 ` Stefan Weil [this message]
2010-10-22 18:23 ` [Qemu-devel] " Blue Swirl
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=4CC16896.3090609@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).