diff --git a/CMakeLists.txt b/CMakeLists.txt index e4d6793..07810da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 2.8.11) project (cpp-jwt) #SET (CMAKE_CXX_COMPILER /usr/local/bin/g++) -SET( CMAKE_CXX_FLAGS "-std=c++14 -Wall" ) +SET( CMAKE_CXX_FLAGS "-std=c++14 -Wall -Wextra" ) include_directories (include) diff --git a/include/jwt/base64.hpp b/include/jwt/base64.hpp index 226c1f0..4cb28d7 100644 --- a/include/jwt/base64.hpp +++ b/include/jwt/base64.hpp @@ -229,16 +229,16 @@ inline std::string base64_decode(const char* in, size_t len) const auto fourth = dmap.at(in[3]); result[i + 2] = (third << 6) | fourth; bytes_wr++; - //FALLTHROUGH } + //FALLTHROUGH case 3: { const auto second = dmap.at(in[1]); const auto third = dmap.at(in[2]); result[i + 1] = (second << 4) | (third >> 2); bytes_wr++; - //FALLTHROUGH } + //FALLTHROUGH case 2: { const auto first = dmap.at(in[0]); diff --git a/include/jwt/impl/jwt.ipp b/include/jwt/impl/jwt.ipp index 197a614..01b0881 100644 --- a/include/jwt/impl/jwt.ipp +++ b/include/jwt/impl/jwt.ipp @@ -607,6 +607,7 @@ void jwt_object::set_decode_params(DecodeParams& dparams, params::detail::valida template void jwt_object::set_decode_params(DecodeParams& dparams) { + (void) dparams; // prevent -Wunused-parameter with gcc return; }