On Thu, 24 Feb 2022 at 18:38, <marcandre.lur...@redhat.com> wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > This workaround was added in commit 95df51a4 ("w32: Always use standard > instead of native format strings"), as it claimed glib was using > __printf__ attribute. This is surprising, since glib has always used > G_GNUC_PRINTF which, as the name implies, uses __gnu_printf__ when > possible.
This was not always true: before this commit from 2018 https://github.com/GNOME/glib/commit/98a0ab929d8c59ee27e5f470f11d077bb6a56749 G_GNUC_PRINTF used always used __printf__. I think that change only landed in glib 2.58, so since our current minimum glib version is 2.56 we need to retain this workaround. > Apparently, the workaound is no longer relevant though, I don't see > the warnings. You're probably building with a newer glib, and possibly also a newer mingw. I've cc'd Stefan Weil who might know whether we can drop this workaround as far as the mingw part is concerned. > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > include/qemu/compiler.h | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h > index 2704c314dcac..eb29b72c14d7 100644 > --- a/include/qemu/compiler.h > +++ b/include/qemu/compiler.h > @@ -73,14 +73,6 @@ > #define QEMU_BUILD_BUG_ON_ZERO(x) (sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)) - \ > sizeof(QEMU_BUILD_BUG_ON_STRUCT(x))) > > -#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 > - > #ifndef __has_warning > #define __has_warning(x) 0 /* compatibility with non-clang compilers */ > #endif > -- > 2.35.1.273.ge6ebfd0e8cbb thanks -- PMM