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
main
sdong 5 years ago committed by Facebook Github Bot
parent 2e0159ec9e
commit b2bc1da561
  1. 6
      options/options_parser.cc

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

Loading…
Cancel
Save