Skip to content

Commit

Permalink
Back out "Enable -Wunused-variable in glean/PACKAGE"
Browse files Browse the repository at this point in the history
Summary: Original Phabricator Diff: D66847527

Reviewed By: bochko, malanka

Differential Revision: D67276738

fbshipit-source-id: eba0357ac006e6a820a6eb0c60c76f6f034174f8
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Dec 16, 2024
1 parent dc15724 commit 2fac481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions glean/rocksdb/database-impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,16 @@ struct SeekIterator final : rts::FactIterator {
Fact::Ref get(Demand demand) override {
if (iter_->Valid()) {
auto key = input(iter_->key());
assert(key.fixed<Pid>() == type_);
auto ty = key.fixed<Pid>();
assert(ty == type_);
auto value = input(iter_->value());
auto id = value.fixed<Id>();
assert(value.empty());

if (demand == KeyOnly) {
return Fact::Ref{id, type_, Fact::Clause::fromKey(key.bytes())};
} else {
[[maybe_unused]] auto found = db_->lookupById(id, slice_);
auto found = db_->lookupById(id, slice_);
assert(found);
return decomposeFact(id, slice_);
}
Expand Down
5 changes: 3 additions & 2 deletions glean/rts/stacked.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,12 @@ struct Stacked<Define> final : StackedBase<Define> {
// similar). This means that there is no need to check against the
// value stored in the database as that must be empty, too.
if (clause.value_size != 0) {
assert(base->factById(id, [&](auto, auto found) {
bool found = base->factById(id, [&](auto, auto found) {
if (clause.value() != found.value()) {
id = Id::invalid();
}
}));
});
assert(found);
}
return id;
}
Expand Down

0 comments on commit 2fac481

Please sign in to comment.