From 1c38ebb55103c8bf4ee976bba4c6392f5c69fef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 28 Jan 2023 13:32:53 +0800 Subject: [PATCH] Parsing: only disable warning when necessary --- src/common/parsing.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/parsing.c b/src/common/parsing.c index bcaebc3c7..5761206d3 100644 --- a/src/common/parsing.c +++ b/src/common/parsing.c @@ -4,8 +4,10 @@ #include #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat=" +#ifdef _WIN32 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wformat" +#endif void ffParseSemver(FFstrbuf* buffer, const FFstrbuf* major, const FFstrbuf* minor, const FFstrbuf* patch) { @@ -169,4 +171,6 @@ void ffParseGTK(FFstrbuf* buffer, const FFstrbuf* gtk2, const FFstrbuf* gtk3, co } } -#pragma GCC diagnostic pop +#ifdef _WIN32 + #pragma GCC diagnostic pop +#endif