This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 7598e8d9 Make a compile error while facing unused variables (#1854)
7598e8d9 is described below
commit 7598e8d9eebffb6a6cf0bb16bfa56877b9e3dc4c
Author: Twice <[email protected]>
AuthorDate: Tue Oct 24 22:19:20 2023 +0900
Make a compile error while facing unused variables (#1854)
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0b69e0d..f76d30e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,7 +207,8 @@ add_library(kvrocks_objs OBJECT ${KVROCKS_SRCS})
target_include_directories(kvrocks_objs PUBLIC src src/common src/vendor
${PROJECT_BINARY_DIR} ${Backtrace_INCLUDE_DIR})
target_compile_features(kvrocks_objs PUBLIC cxx_std_17)
-target_compile_options(kvrocks_objs PUBLIC -Wall -Wpedantic -Wsign-compare
-Wreturn-type -fno-omit-frame-pointer -Werror=unused-result)
+target_compile_options(kvrocks_objs PUBLIC -Wall -Wpedantic -Wsign-compare
-Wreturn-type -fno-omit-frame-pointer)
+target_compile_options(kvrocks_objs PUBLIC -Werror=unused-result
-Werror=unused-variable)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(kvrocks_objs PUBLIC -Wno-pedantic)
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID
STREQUAL "AppleClang"))