Cleanup compiler warnings declarations

Remove '-Wno-switch' and '-Wno-invalid-offsetof' as they do no longer
suppress any existing warnings. Also group warning disablers together.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-06-21 18:59:33 +02:00
parent f2b2222284
commit 24a5b72020
+4 -5
View File
@@ -272,13 +272,8 @@ function project_set_build_flags()
if not _OPTIONS["minimal-flags"] then
buildoptions {
-- enable most of the standard warnings
"-Wno-switch", -- enumeration value not handled in switch (this is sometimes useful, but results in lots of noise)
"-Wno-reorder", -- order of initialization list in constructors (lots of noise)
"-Wno-invalid-offsetof", -- offsetof on non-POD types (see comment in renderer/PatchRData.cpp)
"-Wextra",
-- "-Wconversion", FIXME: should seriously consider fixing so this warning can be enabled.
"-Wno-missing-field-initializers", -- (this is common in external headers we can't fix)
-- add some other useful warnings that need to be enabled explicitly
"-Wunused-parameter",
@@ -288,6 +283,10 @@ function project_set_build_flags()
"-Wnon-virtual-dtor", -- (sometimes noisy but finds real bugs)
"-Wundef", -- (useful for finding macro name typos)
-- disable some warnings that currently trigger
"-Wno-missing-field-initializers", -- (this is common in external headers we can't fix)
"-Wno-reorder", -- order of initialization list in constructors (lots of noise)
-- enable security features (stack checking etc) that shouldn't have
-- a significant effect on performance and can catch bugs
"-fstack-protector-strong",