silences following warning from GCC:
../src/kv/RocksDBStore.cc:386:7: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
386 | if (r < 0) {
| ^~
Signed-off-by: Kefu Chai <kchai@redhat.com>
{
// keep aligned with func tryInterpret
const set<string> need_interp_keys = {"compaction_threads", "flusher_threads", "compact_on_mount", "disableWAL"};
- int r;
rocksdb::Status status;
std::unordered_map<std::string, std::string> str_map;
status = StringToMap(opt_str, &str_map);
string this_opt = it->first + "=" + it->second;
rocksdb::Status status =
rocksdb::GetOptionsFromString(opt, this_opt, &opt);
+ int r = 0;
if (!status.ok()) {
if (interp != nullptr) {
r = interp(it->first, it->second, opt);