[libunwind] d212bdf - [libunwind] Compile with -Wunused-but-set-variable

Daniel Kiss via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 2 02:43:25 PDT 2021


Author: Daniel Kiss
Date: 2021-09-02T11:43:20+02:00
New Revision: d212bdf82883c8880da5a2ee67ce6b7b9a239f88

URL: https://github.com/llvm/llvm-project/commit/d212bdf82883c8880da5a2ee67ce6b7b9a239f88
DIFF: https://github.com/llvm/llvm-project/commit/d212bdf82883c8880da5a2ee67ce6b7b9a239f88.diff

LOG: [libunwind] Compile with -Wunused-but-set-variable

-Wunused-but-set-variable triggers a warning even the block of code is effectively dead.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107835

Added: 
    

Modified: 
    libunwind/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index b6017382646b..3d4c4be6fb8b 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -207,7 +207,6 @@ add_compile_flags_if_supported(-Wsign-compare)
 add_compile_flags_if_supported(-Wsign-conversion)
 add_compile_flags_if_supported(-Wstrict-aliasing=2)
 add_compile_flags_if_supported(-Wstrict-overflow=4)
-add_compile_flags_if_supported(-Wunused-but-set-variable)
 add_compile_flags_if_supported(-Wunused-parameter)
 add_compile_flags_if_supported(-Wunused-variable)
 add_compile_flags_if_supported(-Wwrite-strings)


        


More information about the cfe-commits mailing list