JsonBuilder *js_notes;
} RuleAnalyzer;
-static void __attribute__ ((format (printf, 2, 3)))
-AnalyzerNote(RuleAnalyzer *ctx, char *fmt, ...)
+static void ATTR_FMT_PRINTF(2, 3) AnalyzerNote(RuleAnalyzer *ctx, char *fmt, ...)
{
va_list ap;
char str[1024];
jb_append_string(ctx->js_notes, str);
}
-static void __attribute__ ((format (printf, 2, 3)))
-AnalyzerWarning(RuleAnalyzer *ctx, char *fmt, ...)
+static void ATTR_FMT_PRINTF(2, 3) AnalyzerWarning(RuleAnalyzer *ctx, char *fmt, ...)
{
va_list ap;
char str[1024];
#define WARN_UNUSED __attribute__((warn_unused_result))
-#if defined(__GNUC__)
+#if defined(__MINGW32__)
+#define ATTR_FMT_PRINTF(x, y) __attribute__((format(__MINGW_PRINTF_FORMAT, (x), (y))))
+#elif defined(__GNUC__)
#define ATTR_FMT_PRINTF(x, y) __attribute__((format(printf, (x), (y))))
#else
#define ATTR_FMT_PRINTF(x, y)