From 24a5b72020d4672e785fae4dd31a26a0da86b6a9 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Sat, 21 Jun 2025 18:59:33 +0200 Subject: [PATCH] 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 --- build/premake/premake5.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 6f9cbe8c90..ff6e40d860 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -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",