Fix warnings.

GitOrigin-RevId: 809793ee7ad1b64faa30de705c85aa095fcc9c32
This commit is contained in:
levlam 2018-01-23 19:45:51 +03:00
parent 48074b2fc6
commit dbe1509a33

View File

@ -55,6 +55,7 @@ static void init_base64_table() {
} }
return true; return true;
}(); }();
CHECK(is_inited);
} }
Result<string> base64_decode(Slice base64) { Result<string> base64_decode(Slice base64) {
@ -139,6 +140,7 @@ static void init_base64url_table() {
} }
return true; return true;
}(); }();
CHECK(is_inited);
} }
Result<string> base64url_decode(Slice base64) { Result<string> base64url_decode(Slice base64) {
@ -220,13 +222,13 @@ static bool is_base64_impl(Slice input) {
} }
if ((input.size() & 3) == 2) { if ((input.size() & 3) == 2) {
auto value = table[input.back()]; auto value = table[static_cast<int>(input.back())];
if ((value & 15) != 0) { if ((value & 15) != 0) {
return false; return false;
} }
} }
if ((input.size() & 3) == 3) { if ((input.size() & 3) == 3) {
auto value = table[input.back()]; auto value = table[static_cast<int>(input.back())];
if ((value & 3) != 0) { if ((value & 3) != 0) {
return false; return false;
} }