From c95f1e023a4862d80ecca79b03d697aa82b4d0c2 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 4 Nov 2024 11:05:28 -0800 Subject: [PATCH] Remove unused-variable in velox/buffer/tests/BufferTest.cpp +8 (#11421) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/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 --- velox/functions/lib/RowsTranslationUtil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/velox/functions/lib/RowsTranslationUtil.h b/velox/functions/lib/RowsTranslationUtil.h index 97185203ba28..0d3a3138d4b2 100644 --- a/velox/functions/lib/RowsTranslationUtil.h +++ b/velox/functions/lib/RowsTranslationUtil.h @@ -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().end(); - const auto offsetRange = + VELOX_DEBUG_ONLY const auto offsetRange = arrayBaseVector->offsets()->template asRange().end(); SelectivityVector elementRows(size, false);