From e5924d8980e0bd027f2f12fa702ec1c555538230 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 23 Sep 2010 21:28:03 +0200 Subject: Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking) Since version 4.4.x, gcc supports additional format attributes. __attribute__ ((format (gnu_printf, 1, 2))) should be used instead of __attribute__ ((format (printf, 1, 2)) because QEMU always uses standard format strings (even with mingw32). The patch replaces format attribute printf / __printf__ by macro GCC_FMT_ATTR which uses gnu_printf if supported. It also removes an #ifdef __GNUC__ (not needed any longer). Cc: Blue Swirl Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- audio/audio.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'audio') diff --git a/audio/audio.h b/audio/audio.h index 454ade260e..39a0631317 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -87,11 +87,7 @@ typedef struct QEMUAudioTimeStamp { } QEMUAudioTimeStamp; void AUD_vlog (const char *cap, const char *fmt, va_list ap); -void AUD_log (const char *cap, const char *fmt, ...) -#ifdef __GNUC__ - __attribute__ ((__format__ (__printf__, 2, 3))) -#endif - ; +void AUD_log (const char *cap, const char *fmt, ...) GCC_FMT_ATTR(2, 3); void AUD_help (void); void AUD_register_card (const char *name, QEMUSoundCard *card); -- cgit v1.2.3