Skip to content

Commit

Permalink
Remove unused variables in gloo/rendezvous/redis_store.cc
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: danzimm

Differential Revision: D52848007

fbshipit-source-id: 58693326dda966d9496635ef292e3a768ea26672
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 17, 2024
1 parent e6c13da commit 6a4f7ed
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions gloo/rendezvous/redis_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
namespace gloo {
namespace rendezvous {

static const std::chrono::seconds kWaitTimeout = std::chrono::seconds(60);

RedisStore::RedisStore(const std::string& host, int port) {
struct timeval timeout = {.tv_sec = 2};
redis_ = redisConnectWithTimeout(host.c_str(), port, timeout);
Expand Down

0 comments on commit 6a4f7ed

Please sign in to comment.