Module: wine Branch: master Commit: a80b183af74194a06af3281ee272590a7134b7f1 URL: https://gitlab.winehq.org/wine/wine/-/commit/a80b183af74194a06af3281ee272590...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Apr 21 13:13:59 2023 +0200
msi/tests: Ok_() takes printf-style arguments.
This lets the compiler check that the format and argument sizes match.
---
dlls/msi/tests/custom.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 6c73687b3c5..5b81deb2c94 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -32,9 +32,15 @@ #include <msiquery.h> #include <msidefs.h>
+#if defined(__MINGW32__) || (!defined(__WINE_USE_MSVCRT) && (defined(__GNUC__) || defined(__clang__))) +#define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) +#else +#define __WINE_PRINTF_ATTR(fmt,args) +#endif + static int todo_level, todo_do_loop;
-static void WINAPIV ok_(MSIHANDLE hinst, int todo, const char *file, int line, int condition, const char *msg, ...) +static void WINAPIV __WINE_PRINTF_ATTR(6,7) ok_(MSIHANDLE hinst, int todo, const char *file, int line, int condition, const char *msg, ...) { static char buffer[2000]; MSIHANDLE record;