From 894cebfb2b81c81f7bfdbec7b9302437076bedff Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 1 Oct 2020 09:48:36 -0400 Subject: [PATCH] Adding more flags. --- CMakeLists.txt | 2 +- test/options.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; };