From 8d0d3d4d7baaf73d32ba1dd85c16b94b467e1ab6 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Fri, 16 Aug 2024 16:12:58 +0200 Subject: [PATCH] Add explicit -Werror=unused-variable Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider Reviewed-by: Eshan Kelkar (cherry picked from commit 8295945011025305c97de879173fb9f239d4bb79) --- CompilerChecks.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index 81fb5462..9719e699 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -48,6 +48,7 @@ if (UNIX) add_c_compiler_flag("-Werror=implicit-int" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wint-conversion" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Werror=int-conversion" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Werror=unused-variable" SUPPORTED_COMPILER_FLAGS) check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT) if (REQUIRED_FLAGS_WFORMAT)