diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e9b862..3098445 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2") elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion") endif() add_library(cxxopts INTERFACE) diff --git a/test/options.cpp b/test/options.cpp index b98bade..dccb047 100644 --- a/test/options.cpp +++ b/test/options.cpp @@ -36,7 +36,7 @@ class Argv { private: - std::vector> m_args; + std::vector> m_args{}; std::unique_ptr m_argv; int m_argc; };