[PATCH 3/8] dllhost: Implement ISurrogate::LoadDllServer().

Eric Pouech eric.pouech at orange.fr
Tue Feb 22 12:01:37 CST 2022


> I think this happens on MinGW with GCC 11. It's technically correct, 
> but harmless, so I can see why Clang does not complain. That's because 
> long == int on Windows model, even on 64-bit (i.e. it's still 32 
> bits), so %u doesn't give a wrong result.
>
no that's because we need to tell the compiler which routines behave 
like printf and which of their parameters should be checked as such

here (for TRACE), we have include/wine/debug.h

#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

and later

static const char * __wine_dbg_cdecl wine_dbg_sprintf( const char 
*format, ... ) __WINE_PRINTF_ATTR(1,2);


hence, we currently assume that __MINGW32__ is defined for enabling this 
feature

this is fine for gcc/mingw, and also for the clang mingw port, but 
doesn't work with stock clang

I'll see to improve it


A+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220222/823aa200/attachment.htm>


More information about the wine-devel mailing list