Skip to content

Commit

Permalink
Add the condition for the warning suppression in VectorFuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
xin-zhang2 committed Mar 6, 2025
1 parent d947235 commit 8e570a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion velox/vector/fuzzer/VectorFuzzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,20 @@ class VectorFuzzer {
fuzzer::DataSpec dataSpec{false, false};
};

// Spurious warnings in GCC 13
// Suppress spurious warnings in GCC 12.4 and later
#if defined(__GNUC__) && \
((__GNUC__ > 12) || (__GNUC__ == 12 && __GNUC_MINOR__ >= 4))
VELOX_SUPPRESS_STRINGOP_OVERFLOW_WARNING
#endif
VectorFuzzer(
const VectorFuzzer::Options& options,
memory::MemoryPool* pool,
size_t seed = 123456)
: opts_(options), pool_(pool), rng_(seed) {}
#if defined(__GNUC__) && \
((__GNUC__ > 12) || (__GNUC__ == 12 && __GNUC_MINOR__ >= 4))
VELOX_UNSUPPRESS_STRINGOP_OVERFLOW_WARNING
#endif

void setOptions(const VectorFuzzer::Options& options) {
opts_ = options;
Expand Down

0 comments on commit 8e570a3

Please sign in to comment.