Skip to content

Commit

Permalink
Remove unused variables in glass/graph_engine/apps/RandomWalk.h
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: D56065775

fbshipit-source-id: 77be2f0fdaa133fe6ad5121b0b6c2ee5246bdb32
  • Loading branch information
r-barnes authored and facebook-github-bot committed Apr 13, 2024
1 parent 3751dcf commit 205bbe2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion glean/rts/inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Inventory::Inventory() : first_id(Pid::lowest())
{}

Inventory::Inventory(std::vector<Predicate> ps) {
size_t n;
first_id = Pid::invalid();
auto last_id = Pid::lowest();
for (const auto& p : ps) {
Expand Down

0 comments on commit 205bbe2

Please sign in to comment.