Skip to content

Commit

Permalink
Merge pull request XRPLF#273 from nbougalis/static-analysis
Browse files Browse the repository at this point in the history
Cleanups from static analysis
  • Loading branch information
igorcanadi committed Sep 6, 2014
2 parents b7b031f + 9f8aa09 commit db8ca52
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions include/rocksdb/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ class Cache {
void LRU_Append(Handle* e);
void Unref(Handle* e);

struct Rep;
Rep* rep_;

// No copying allowed
Cache(const Cache&);
void operator=(const Cache&);
Expand Down
2 changes: 1 addition & 1 deletion port/stack_trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const char* GetExecutableName() {

char link[1024];
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) {
return nullptr;
} else {
Expand Down
2 changes: 1 addition & 1 deletion util/hash_cuckoo_rep.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class HashCuckooRep : public MemTableRep {
}

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;
}

Expand Down
1 change: 1 addition & 0 deletions util/ldb_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ void ManifestDumpCommand::DoCommand() {
} else {
exec_state_ = LDBCommandExecuteResult::FAILED(
"Multiple MANIFEST files found; use --path to select one");
closedir(d);
return;
}
}
Expand Down
1 change: 1 addition & 0 deletions utilities/spatialdb/spatial_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ std::string FeatureSet::DebugString() const {
switch (iter.second.type()) {
case Variant::kNull:
out.append("null");
break;
case Variant::kBool:
if (iter.second.get_bool()) {
out.append("true");
Expand Down

0 comments on commit db8ca52

Please sign in to comment.