From bd2877154f404989de9e90b7cf74729b2e99d6eb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 1 Jun 2019 20:26:43 -0400 Subject: [PATCH] Oh, it turns out there IS a warning for shutting up -pedantic. Woo! --- meson.build | 5 +++++ test/lib/timer_windows.c | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 04003747..c54d961f 100644 --- a/meson.build +++ b/meson.build @@ -96,6 +96,11 @@ else ] if libui_OS == 'windows' + # -pedantic causes warnings without this, even if a function is explicitly marked __attribute__((format(ms_printf))) + # references: https://curl.haxx.se/mail/lib-2012-06/0433.html + libui_project_compile_args += [ + '-Wno-pedantic-ms-format', + ] # don't require shipping the MinGW-w64 DLLs libui_project_link_args += [ '-static', diff --git a/test/lib/timer_windows.c b/test/lib/timer_windows.c index d1113077..f2edb847 100644 --- a/test/lib/timer_windows.c +++ b/test/lib/timer_windows.c @@ -269,15 +269,7 @@ static void redirectToOnTimeout(CONTEXT *ctx, struct timeoutParams *p) static void criticalCallFailed(const char *func, HRESULT hr) { -// sigh, -pedantic... (TODO) -#ifndef _MSC_VER -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat" -#endif fprintf(stderr, "*** internal error in timerRunWithTimeout(): %s failed: 0x%08I32X\n", func, hr); -#ifndef _MSC_VER -#pragma GCC diagnostic pop -#endif abort(); }