Skip to content

Commit

Permalink
Remove unused-variable in velox/buffer/tests/BufferTest.cpp +8 (#11421)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #11421

LLVM-15 has a warning `-Wunused-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]]`.

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

Reviewed By: palmje

Differential Revision: D65282800

fbshipit-source-id: 3ebdc85005aa8a250db6c5e72826d18a7a95f926
  • Loading branch information
r-barnes authored and facebook-github-bot committed Nov 4, 2024
1 parent 7fde3c6 commit c95f1e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions velox/functions/lib/RowsTranslationUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ SelectivityVector toElementRows(
auto rawNulls = arrayBaseVector->rawNulls();
auto rawSizes = arrayBaseVector->rawSizes();
auto rawOffsets = arrayBaseVector->rawOffsets();
const auto sizeRange =
VELOX_DEBUG_ONLY const auto sizeRange =
arrayBaseVector->sizes()->template asRange<vector_size_t>().end();
const auto offsetRange =
VELOX_DEBUG_ONLY const auto offsetRange =
arrayBaseVector->offsets()->template asRange<vector_size_t>().end();

SelectivityVector elementRows(size, false);
Expand Down

0 comments on commit c95f1e0

Please sign in to comment.