Merge pull request #42 from leoTlr/master

prevent gcc warnings
This commit is contained in:
Arun Muralidharan 2019-04-04 11:58:16 +05:30 committed by GitHub
commit 10337fcefc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 2.8.11)
project (cpp-jwt) project (cpp-jwt)
#SET (CMAKE_CXX_COMPILER /usr/local/bin/g++) #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) include_directories (include)

View file

@ -229,16 +229,16 @@ inline std::string base64_decode(const char* in, size_t len)
const auto fourth = dmap.at(in[3]); const auto fourth = dmap.at(in[3]);
result[i + 2] = (third << 6) | fourth; result[i + 2] = (third << 6) | fourth;
bytes_wr++; bytes_wr++;
//FALLTHROUGH
} }
//FALLTHROUGH
case 3: case 3:
{ {
const auto second = dmap.at(in[1]); const auto second = dmap.at(in[1]);
const auto third = dmap.at(in[2]); const auto third = dmap.at(in[2]);
result[i + 1] = (second << 4) | (third >> 2); result[i + 1] = (second << 4) | (third >> 2);
bytes_wr++; bytes_wr++;
//FALLTHROUGH
} }
//FALLTHROUGH
case 2: case 2:
{ {
const auto first = dmap.at(in[0]); const auto first = dmap.at(in[0]);

View file

@ -607,6 +607,7 @@ void jwt_object::set_decode_params(DecodeParams& dparams, params::detail::valida
template <typename DecodeParams> template <typename DecodeParams>
void jwt_object::set_decode_params(DecodeParams& dparams) void jwt_object::set_decode_params(DecodeParams& dparams)
{ {
(void) dparams; // prevent -Wunused-parameter with gcc
return; return;
} }