Skip to content

Commit

Permalink
Remove unused variables in velox/exec/ContainerRowSerde.cpp (facebook…
Browse files Browse the repository at this point in the history
…incubator#8785)

Summary:
Pull Request resolved: facebookincubator#8785

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

fbshipit-source-id: e9fa9ae3f8fc029064b0515216b82ff02a7ef1fc
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 19, 2024
1 parent 8421be1 commit f31c8ac
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions velox/exec/ContainerRowSerde.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ void serializeOne<TypeKind::MAP>(
ByteOutputStream& out) {
auto map = vector.wrappedVector()->asUnchecked<MapVector>();
auto wrappedIndex = vector.wrappedIndex(index);
auto size = map->sizeAt(wrappedIndex);
auto offset = map->offsetAt(wrappedIndex);
auto indices = map->sortedKeyIndices(wrappedIndex);
serializeArray(*map->mapKeys(), indices, out);
serializeArray(*map->mapValues(), indices, out);
Expand Down

0 comments on commit f31c8ac

Please sign in to comment.