Skip to content

Commit

Permalink
Change warning muting so it affects all levels, but locally
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Aug 26, 2024
1 parent e53dc80 commit 2f48cba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,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":
Expand Down
9 changes: 9 additions & 0 deletions core/os/safe_binary_mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

#ifdef THREADS_ENABLED

#ifdef defined(__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).
Expand Down Expand Up @@ -105,6 +110,10 @@ class MutexLock<SafeBinaryMutex<Tag>> {
}
};

#ifdef defined(__clang__)
#pragma clang diagnostic pop
#endif

#else // No threads.

template <int Tag>
Expand Down

0 comments on commit 2f48cba

Please sign in to comment.