From: Zebediah Figura Subject: Re: [PATCH 1/2] include: Don't use the printf format attribute when compiling against msvcrt and not cross-compiling. Message-Id: <1a472f21-7e50-fa78-39aa-b1d662fa9aac@gmail.com> Date: Wed, 4 Dec 2019 14:09:31 -0600 In-Reply-To: References: <20191204182648.112184-1-z.figura12@gmail.com> On 12/4/19 12:36 PM, Chip Davis wrote: > December 4, 2019 12:28 PM, "Zebediah Figura" wrote: > >> diff --git a/include/wine/debug.h b/include/wine/debug.h >> index 1c312e9322..81c32e1816 100644 >> --- a/include/wine/debug.h >> +++ b/include/wine/debug.h >> @@ -92,7 +92,11 @@ struct __wine_debug_channel >> #define __WINE_DBG_LOG(args...) \ >> wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0) >> >> +#if !defined(__WINE_USE_MSVCRT) || defined(__MINGW32__) >> #define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) >> +#else >> +#define __WINE_PRINTF_ATTR(fmt,args) >> +#endif > > Consider using '__attribute__((format(ms_printf)))' instead. That shouldn't warn on %I, but would still give us the benefits of GCC/Clang's warning. Note that Clang does not yet support that form. I have a patch to fix that, but I need to get it upstream. At least on gcc 9.2 ms_printf is only recognized for mingw targets. The documentation implies this as well: "On MinGW targets, ms_printf, ms_scanf, and ms_strftime are also present." [1] [1] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes > >> >> #ifdef WINE_NO_TRACE_MSGS > > > Chip >