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 --- bsd-user/qemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bsd-user/qemu.h') diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 554ff8b0ee..976361622d 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -139,7 +139,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1, abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6); -void gemu_log(const char *fmt, ...) __attribute__((format(printf,1,2))); +void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2); extern THREAD CPUState *thread_env; void cpu_loop(CPUState *env); char *target_strerror(int err); -- cgit v1.2.3