Merge pull request #273 from nbougalis/static-analysis
Cleanups from static analysis
This commit is contained in:
commit
db8ca520b2
@ -127,9 +127,6 @@ class Cache {
|
|||||||
void LRU_Append(Handle* e);
|
void LRU_Append(Handle* e);
|
||||||
void Unref(Handle* e);
|
void Unref(Handle* e);
|
||||||
|
|
||||||
struct Rep;
|
|
||||||
Rep* rep_;
|
|
||||||
|
|
||||||
// No copying allowed
|
// No copying allowed
|
||||||
Cache(const Cache&);
|
Cache(const Cache&);
|
||||||
void operator=(const Cache&);
|
void operator=(const Cache&);
|
||||||
|
@ -33,7 +33,7 @@ const char* GetExecutableName() {
|
|||||||
|
|
||||||
char link[1024];
|
char link[1024];
|
||||||
snprintf(link, sizeof(link), "/proc/%d/exe", getpid());
|
snprintf(link, sizeof(link), "/proc/%d/exe", getpid());
|
||||||
auto read = readlink(link, name, sizeof(name));
|
auto read = readlink(link, name, sizeof(name) - 1);
|
||||||
if (-1 == read) {
|
if (-1 == read) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else {
|
} else {
|
||||||
|
@ -70,7 +70,7 @@ class HashCuckooRep : public MemTableRep {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cuckoo_path_ = reinterpret_cast<int*>(
|
cuckoo_path_ = reinterpret_cast<int*>(
|
||||||
arena_->Allocate(sizeof(int*) * (cuckoo_path_max_depth_ + 1)));
|
arena_->Allocate(sizeof(int) * (cuckoo_path_max_depth_ + 1)));
|
||||||
is_nearly_full_ = false;
|
is_nearly_full_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,6 +541,7 @@ void ManifestDumpCommand::DoCommand() {
|
|||||||
} else {
|
} else {
|
||||||
exec_state_ = LDBCommandExecuteResult::FAILED(
|
exec_state_ = LDBCommandExecuteResult::FAILED(
|
||||||
"Multiple MANIFEST files found; use --path to select one");
|
"Multiple MANIFEST files found; use --path to select one");
|
||||||
|
closedir(d);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,6 +221,7 @@ std::string FeatureSet::DebugString() const {
|
|||||||
switch (iter.second.type()) {
|
switch (iter.second.type()) {
|
||||||
case Variant::kNull:
|
case Variant::kNull:
|
||||||
out.append("null");
|
out.append("null");
|
||||||
|
break;
|
||||||
case Variant::kBool:
|
case Variant::kBool:
|
||||||
if (iter.second.get_bool()) {
|
if (iter.second.get_bool()) {
|
||||||
out.append("true");
|
out.append("true");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user