From 65fb7d942acb6ac7929021d159f3d480e89c6847 Mon Sep 17 00:00:00 2001 From: yan ma Date: Tue, 23 Apr 2024 21:20:58 +0800 Subject: [PATCH] Fix GCC 11 warns that writing 1 byte into a region of size 0 [-Wstringop-overflow=] --- velox/vector/SelectivityVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/velox/vector/SelectivityVector.h b/velox/vector/SelectivityVector.h index f0a890040db0..f65243ed211e 100644 --- a/velox/vector/SelectivityVector.h +++ b/velox/vector/SelectivityVector.h @@ -156,7 +156,7 @@ class SelectivityVector { bits::fillBits(bits_.data(), 0, size_, false); begin_ = 0; end_ = 0; - allSelected_ = false; + allSelected_.reset(); } /** @@ -279,7 +279,7 @@ class SelectivityVector { if (begin_ == -1) { begin_ = 0; end_ = 0; - allSelected_ = false; + allSelected_.reset(); return; } end_ = bits::findLastBit(bits_.data(), begin_, size_) + 1;