summary refs log tree commit diff stats
path: root/include/qemu/compiler.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-20 20:39:25 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-22 14:40:51 +0400
commit9edc6313da34699ebd2bae4573ea22339b26450a (patch)
treec04eb27a7ce157789496b078b824c8eae8ddba05 /include/qemu/compiler.h
parente7b794282264868d84b3d9a5da222b08a783d8fb (diff)
downloadfocaccia-qemu-9edc6313da34699ebd2bae4573ea22339b26450a.tar.gz
focaccia-qemu-9edc6313da34699ebd2bae4573ea22339b26450a.zip
Replace GCC_FMT_ATTR with G_GNUC_PRINTF
One less qemu-specific macro. It also helps to make some headers/units
only depend on glib, and thus moved in standalone projects eventually.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Diffstat (limited to 'include/qemu/compiler.h')
-rw-r--r--include/qemu/compiler.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 3baa5e3790..f2bd050e3b 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -79,19 +79,12 @@
 #define QEMU_BUILD_BUG_ON_ZERO(x) (sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)) - \
                                    sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)))
 
-#if defined(__clang__)
-/* clang doesn't support gnu_printf, so use printf. */
-# define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
-#else
-/* Use gnu_printf (qemu uses standard format strings). */
-# define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
-# if defined(_WIN32)
+#if !defined(__clang__) && defined(_WIN32)
 /*
  * Map __printf__ to __gnu_printf__ because we want standard format strings even
  * when MinGW or GLib include files use __printf__.
  */
-#  define __printf__ __gnu_printf__
-# endif
+# define __printf__ __gnu_printf__
 #endif
 
 #ifndef __has_warning