Skip to content

Commit

Permalink
Remove unused variables in glean/rts/ownership.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: dmm-fb

Differential Revision: D56065767

fbshipit-source-id: 88646966e562356333affb0c08e34a647ba2b7c8
  • Loading branch information
r-barnes authored and facebook-github-bot committed Apr 12, 2024
1 parent 4426b27 commit 3751dcf
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion glean/rts/ownership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ FOLLY_NOINLINE void completeOwnership(

// Iterate over facts backwards - this ensures that we get all dependencies.
const auto min_id = lookup.startingId();
const auto max_id = lookup.firstFreeId();
const auto owner = [&](Id id) -> Uset*& {
if (id < min_id) {
return sparse[id.toWord()];
Expand Down

0 comments on commit 3751dcf

Please sign in to comment.