diff --git a/velox/common/base/Macros.h b/velox/common/base/Macros.h index 03e45f7ce1f9..48bc0f38dcdf 100644 --- a/velox/common/base/Macros.h +++ b/velox/common/base/Macros.h @@ -18,19 +18,13 @@ // Macros to disable deprecation warnings #ifdef __clang__ -#define VELOX_SUPPRESS_DEPRECATION_WARNING \ - _Pragma("clang diagnostic push"); \ - _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") -#define VELOX_UNSUPPRESS_DEPRECATION_WARNING _Pragma("clang diagnostic pop"); -#define VELOX_SUPPRESS_RETURN_LOCAL_ADDR_WARNING -#define VELOX_UNSUPPRESS_RETURN_LOCAL_ADDR_WARNING +#define VELOX_SUPPRESS_STRINGOP_OVERFLOW_WARNING +#define VELOX_UNSUPPRESS_STRINGOP_OVERFLOW_WARNING #else -#define VELOX_SUPPRESS_DEPRECATION_WARNING -#define VELOX_UNSUPPRESS_DEPRECATION_WARNING -#define VELOX_SUPPRESS_RETURN_LOCAL_ADDR_WARNING \ +#define VELOX_SUPPRESS_STRINGOP_OVERFLOW_WARNING \ _Pragma("GCC diagnostic push"); \ - _Pragma("GCC diagnostic ignored \"-Wreturn-local-addr\"") -#define VELOX_UNSUPPRESS_RETURN_LOCAL_ADDR_WARNING \ + _Pragma("GCC diagnostic ignored \"-Wstringop-overflow\"") +#define VELOX_UNSUPPRESS_STRINGOP_OVERFLOW_WARNING \ _Pragma("GCC diagnostic pop"); #endif diff --git a/velox/vector/SelectivityVector.h b/velox/vector/SelectivityVector.h index 18688f844213..1b3539a08f24 100644 --- a/velox/vector/SelectivityVector.h +++ b/velox/vector/SelectivityVector.h @@ -24,6 +24,7 @@ #include "velox/buffer/Buffer.h" #include "velox/common/base/BitUtil.h" #include "velox/common/base/Exceptions.h" +#include "velox/common/base/Macros.h" #include "velox/common/base/Range.h" #include "velox/vector/TypeAliases.h" @@ -160,7 +161,9 @@ class SelectivityVector { bits::fillBits(bits_.data(), 0, size_, false); begin_ = 0; end_ = 0; + VELOX_SUPPRESS_STRINGOP_OVERFLOW_WARNING allSelected_ = false; + VELOX_UNSUPPRESS_STRINGOP_OVERFLOW_WARNING } /**