Skip to content

Commit

Permalink
Remove unused variables in glean/rts/tests/SubstitutionTest.cpp
Browse files Browse the repository at this point in the history
Summary:
LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: palmje

Differential Revision: D56022388

fbshipit-source-id: 1ce16bb29d0a9b4f5735122089f8e9c51846a27f
  • Loading branch information
r-barnes authored and facebook-github-bot committed Apr 11, 2024
1 parent 91d763e commit c3838b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion glean/rts/tests/SubstitutionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct Arbitrary<Substitution> {
template <>
struct Arbitrary<Intervals> {
static Gen<Intervals> arbitrary() {
const auto l = Id::lowest().toWord();
return gen::mapcat(
gen::arbitrary<Substitution>(),
[](const Substitution& subst) -> Gen<Intervals> {
Expand Down
1 change: 0 additions & 1 deletion glean/tools/diff/lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ const char *glean_diff(
folly::Future<folly::Unit> read_db = folly::via(executor, [&](){
std::atomic<int> next_batch = 0;
std::list<folly::Future<Group>> read_queue {};
bool finished_reading = false;

for (auto i = 0; i < parallel_reads; i++) {
read_queue.push_back(folly::via(executor, [&](){
Expand Down

0 comments on commit c3838b9

Please sign in to comment.