mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user