[PATCH 1/2] include: Don't use the printf format attribute when compiling against msvcrt and not cross-compiling. (original) (raw)
Chip Davis cdavis at codeweavers.com
Wed Dec 4 12:36:10 CST 2019
- Previous message (by thread): [PATCH 2/2] mapi32: Use the %I length modifier to print pointer-size integers.
- Next message (by thread): [PATCH 1/2] include: Don't use the printf format attribute when compiling against msvcrt and not cross-compiling.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
December 4, 2019 12:28 PM, "Zebediah Figura" <z.figura12 at gmail.com> 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 winedebugchannel _#define _WINEDBGLOG(args...) _ _winedbglog( _dbcl, dbch, FUNCTION, args); } } while(0)
_+#if !defined(WINEUSEMSVCRT) || defined(MINGW32) _#define WINEPRINTFATTR(fmt,args) attribute((format (printf,fmt,args))) +#else _+#define WINEPRINTFATTR(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.
#ifdef WINENOTRACEMSGS
Chip
- Previous message (by thread): [PATCH 2/2] mapi32: Use the %I length modifier to print pointer-size integers.
- Next message (by thread): [PATCH 1/2] include: Don't use the printf format attribute when compiling against msvcrt and not cross-compiling.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]