From f7662df06f706bc37f74e8b6d67dfe004d9b9e06 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 29 Mar 2021 19:30:53 +0300 Subject: [PATCH] Fix gcc build --- src/AggregateFunctions/ReservoirSamplerDeterministic.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/AggregateFunctions/ReservoirSamplerDeterministic.h b/src/AggregateFunctions/ReservoirSamplerDeterministic.h index 397c3be18e..5cf97ae0f8 100644 --- a/src/AggregateFunctions/ReservoirSamplerDeterministic.h +++ b/src/AggregateFunctions/ReservoirSamplerDeterministic.h @@ -13,6 +13,7 @@ #include #include + namespace DB { namespace ErrorCodes @@ -162,6 +163,11 @@ public: sorted = false; } +#if !__clang__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclass-memaccess" +#endif + void write(DB::WriteBuffer & buf) const { size_t size = samples.size(); @@ -185,6 +191,10 @@ public: } } +#if !__clang__ +#pragma GCC diagnostic pop +#endif + private: /// We allocate some memory on the stack to avoid allocations when there are many objects with a small number of elements. using Element = std::pair; -- GitLab