Parsing: only disable warning when necessary

This commit is contained in:
李通洲
2023-01-28 13:32:53 +08:00
parent 14dcafe2ca
commit 1c38ebb551
+7 -3
View File
@@ -4,8 +4,10 @@
#include <ctype.h>
#include <inttypes.h>
#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