1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Change warning muting so it affects all levels, but locally

(cherry picked from commit 9cbc3f1419)
This commit is contained in:
Pedro J. Estébanez
2024-08-26 12:33:19 +02:00
parent fe2e862e2e
commit 1fd87e8747
2 changed files with 10 additions and 1 deletions

View File

@@ -856,7 +856,7 @@ else: # GCC, Clang
if cc_version_major >= 11: # Broke on MethodBind templates before GCC 11.
env.Append(CCFLAGS=["-Wlogical-op"])
elif methods.using_clang(env) or methods.using_emcc(env):
env.Append(CCFLAGS=["-Wimplicit-fallthrough", "-Wno-undefined-var-template"])
env.Append(CCFLAGS=["-Wimplicit-fallthrough"])
elif env["warnings"] == "all":
env.Append(CCFLAGS=["-Wall"] + common_warnings)
elif env["warnings"] == "moderate":

View File

@@ -37,6 +37,11 @@
#ifdef THREADS_ENABLED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-var-template"
#endif
// A very special kind of mutex, used in scenarios where these
// requirements hold at the same time:
// - Must be used with a condition variable (only binary mutexes are suitable).
@@ -105,6 +110,10 @@ public:
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#else // No threads.
template <int Tag>