Try to fix some analysis failures

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6384

Test Plan: Wait and see the analysis result.

Differential Revision: D19781072

fbshipit-source-id: 75e7cb6ee619ebd289841eaabea03dd075c09d3b
This commit is contained in:
sdong 2020-02-10 13:35:04 -08:00 committed by Facebook Github Bot
parent 2e0159ec9e
commit b2bc1da561

View File

@ -331,7 +331,7 @@ Status RocksDBOptionsParser::ParseVersionNumber(const std::string& ver_name,
for (int i = 0; i < max_count; ++i) {
version[i] = 0;
}
const int kBufferSize = 200;
constexpr int kBufferSize = 200;
char buffer[kBufferSize];
for (size_t i = 0; i < ver_string.size(); ++i) {
if (ver_string[i] == '.') {
@ -749,7 +749,7 @@ Status RocksDBOptionsParser::VerifyDBOptions(
if (!AreEqualOptions(reinterpret_cast<const char*>(&base_opt),
reinterpret_cast<const char*>(&persisted_opt),
pair.second, pair.first, nullptr)) {
const size_t kBufferSize = 2048;
constexpr size_t kBufferSize = 2048;
char buffer[kBufferSize];
std::string base_value;
std::string persisted_value;
@ -787,7 +787,7 @@ Status RocksDBOptionsParser::VerifyCFOptions(
if (!AreEqualOptions(reinterpret_cast<const char*>(&base_opt),
reinterpret_cast<const char*>(&persisted_opt),
pair.second, pair.first, persisted_opt_map)) {
const size_t kBufferSize = 2048;
constexpr size_t kBufferSize = 2048;
char buffer[kBufferSize];
std::string base_value;
std::string persisted_value;