diff --git a/glean/rocksdb/database-impl.cpp b/glean/rocksdb/database-impl.cpp index fb91b604e..04dbd2be4 100644 --- a/glean/rocksdb/database-impl.cpp +++ b/glean/rocksdb/database-impl.cpp @@ -269,7 +269,7 @@ struct SeekIterator final : rts::FactIterator { Fact::Ref get(Demand demand) override { if (iter_->Valid()) { auto key = input(iter_->key()); - auto ty = key.fixed(); + [[maybe_unused]] auto ty = key.fixed(); assert(ty == type_); auto value = input(iter_->value()); auto id = value.fixed(); @@ -278,7 +278,7 @@ struct SeekIterator final : rts::FactIterator { if (demand == KeyOnly) { return Fact::Ref{id, type_, Fact::Clause::fromKey(key.bytes())}; } else { - auto found = db_->lookupById(id, slice_); + [[maybe_unused]] auto found = db_->lookupById(id, slice_); assert(found); return decomposeFact(id, slice_); } diff --git a/glean/rts/stacked.h b/glean/rts/stacked.h index 0c36f512c..f87a3d688 100644 --- a/glean/rts/stacked.h +++ b/glean/rts/stacked.h @@ -160,11 +160,12 @@ struct Stacked final : StackedBase { // 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) { - bool found = base->factById(id, [&](auto, auto found) { - if (clause.value() != found.value()) { - id = Id::invalid(); - } - }); + [[maybe_unused]] bool found = + base->factById(id, [&](auto, auto found) { + if (clause.value() != found.value()) { + id = Id::invalid(); + } + }); assert(found); } return id;