From f1d91d461470123293ea2f1908367de72c16e76a Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Fri, 6 Oct 2023 16:25:04 +0000 Subject: [PATCH] Use aggressive flags to catch issues Signed-off-by: Michael Carroll --- cmake/GzSetCompilerFlags.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/GzSetCompilerFlags.cmake b/cmake/GzSetCompilerFlags.cmake index f4d0aa83..231b2133 100644 --- a/cmake/GzSetCompilerFlags.cmake +++ b/cmake/GzSetCompilerFlags.cmake @@ -137,6 +137,9 @@ macro(_gz_setup_gcc_or_clang) CUSTOM_ALL_FLAGS -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic + -Wlifetime -Wformat=2 -Wold-style-cast -Woverloaded-virtual -Wduplicated-cond + -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wnon-virtual-dtor + -Wimplicit-fallthrough ) # -ggdb3: Produce comprehensive debug information that can be utilized by gdb