diff --git a/CMakeLists.txt b/CMakeLists.txt index 34e6bed..0c163ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ if(CXXOPTS_USE_UNICODE_HELP) pkg_check_modules(ICU REQUIRED icu-uc) set(CXXOPTS_LINKER_LIBRARIES "${ICU_LIBRARIES}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCXXOPTS_USE_UNICODE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -DCXXOPTS_USE_UNICODE") endif() diff --git a/src/cxxopts.hpp b/src/cxxopts.hpp index 91d3aa5..5bd7d5f 100644 --- a/src/cxxopts.hpp +++ b/src/cxxopts.hpp @@ -998,7 +998,7 @@ Options::parse(int& argc, char**& argv) { const std::string& s = result[4]; - for (int i = 0; i != s.size(); ++i) + for (std::size_t i = 0; i != s.size(); ++i) { std::string name(1, s[i]); auto iter = m_options.find(name);