qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] Replace remaining gcc format attributes by


From: Blue Swirl
Subject: [Qemu-devel] Re: [PATCH 2/2] Replace remaining gcc format attributes by macro GCC_FMT_ATTR (format checking)
Date: Fri, 22 Oct 2010 18:23:43 +0000

Thanks, applied both.

On Fri, Oct 22, 2010 at 10:33 AM, Stefan Weil <address@hidden> wrote:
> 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<address@hidden>
>> Signed-off-by: Stefan Weil<address@hidden>
>> ---
>>  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
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]