Skip to content

Commit

Permalink
Remove unused variables in fbit/itstorage/data_crawler/thread/Threade…
Browse files Browse the repository at this point in the history
…dCrawler.cpp (#2397)

Summary:
Pull Request resolved: #2397

X-link: facebookresearch/fbpcf#538

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: D56022415

fbshipit-source-id: 65aa2b310e39ff134bf6dd8a82e3a539c3033660
  • Loading branch information
r-barnes authored and facebook-github-bot committed Apr 12, 2024
1 parent d190aa6 commit 2368e5d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class AttributionIdSpineFileCombinerTest : public testing::Test {
std::string spineIdContentPath =
"/tmp/AttributionIdSpineFileCombinerTestSpineIdContent" +
std::to_string(randStart);
constexpr size_t kBufferedReaderChunkSize = 4096;
data_processing::test_utils::writeVecToFile(dataContent, dataContentPath);
data_processing::test_utils::writeVecToFile(
spineIdContent, spineIdContentPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class PrivateIdDfcaIdSpineFileCombinerTest : public testing::Test {
std::string spineIdContentPath =
"/tmp/PrivateIdDfcaIdSpineFileCombinerTestSpineIdContent" +
std::to_string(randStart);
constexpr size_t kBufferedReaderChunkSize = 4096;
data_processing::test_utils::writeVecToFile(dataContent, dataContentPath);
data_processing::test_utils::writeVecToFile(
spineIdContent, spineIdContentPath);
Expand Down
1 change: 0 additions & 1 deletion fbpcs/emp_games/dotproduct/DotproductGame_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ std::vector<double> DotproductGame<schedulerId>::computeDotProduct(
XLOG(INFO, "Performed the OR for all labels");

constexpr uint64_t divisor = static_cast<uint64_t>(1e9);
constexpr double tolerance = 1e-7;

auto prgFactory = std::make_unique<fbpcf::engine::util::AesPrgFactory>();

Expand Down

0 comments on commit 2368e5d

Please sign in to comment.