This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d1d0d9e5e8 [Chore](build) adjust some compile diagnostic (#20162)
d1d0d9e5e8 is described below
commit d1d0d9e5e81c229d8cfc4f0c5ffa617fa5e9c5fe
Author: Pxl <[email protected]>
AuthorDate: Mon May 29 19:19:01 2023 +0800
[Chore](build) adjust some compile diagnostic (#20162)
---
be/src/util/jsonb_document.h | 5 ++++-
be/src/vec/columns/column_string.h | 10 ----------
be/src/vec/common/cow.h | 14 ++------------
be/src/vec/common/pod_array.h | 14 +-------------
4 files changed, 7 insertions(+), 36 deletions(-)
diff --git a/be/src/util/jsonb_document.h b/be/src/util/jsonb_document.h
index 185e4c30a6..b18d3d47e0 100644
--- a/be/src/util/jsonb_document.h
+++ b/be/src/util/jsonb_document.h
@@ -82,9 +82,10 @@
// #include "util/string_parser.hpp"
namespace doris {
-
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-length-array"
+#endif
#pragma pack(push, 1)
#define JSONB_VER 1
@@ -1350,7 +1351,9 @@ inline bool JsonbPath::parse_member(Stream* stream) {
}
#pragma pack(pop)
+#if defined(__clang__)
#pragma clang diagnostic pop
+#endif
} // namespace doris
#endif // JSONB_JSONBDOCUMENT_H
diff --git a/be/src/vec/columns/column_string.h
b/be/src/vec/columns/column_string.h
index 92a68b6192..d30bda243b 100644
--- a/be/src/vec/columns/column_string.h
+++ b/be/src/vec/columns/column_string.h
@@ -136,12 +136,6 @@ public:
return StringRef(&chars[offset_at(n)], size_at(n));
}
-/// Suppress gcc 7.3.1 warning: '*((void*)&<anonymous> +8)' may be used
uninitialized in this function
-#if !__clang__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#endif
-
void insert(const Field& x) override {
const String& s = doris::vectorized::get<const String&>(x);
const size_t old_size = chars.size();
@@ -155,10 +149,6 @@ public:
offsets.push_back(new_size);
}
-#if !__clang__
-#pragma GCC diagnostic pop
-#endif
-
void insert_from(const IColumn& src_, size_t n) override {
const ColumnString& src = assert_cast<const ColumnString&>(src_);
const size_t size_to_append =
diff --git a/be/src/vec/common/cow.h b/be/src/vec/common/cow.h
index bad157ffa4..d3ab0ebd68 100644
--- a/be/src/vec/common/cow.h
+++ b/be/src/vec/common/cow.h
@@ -139,19 +139,9 @@ protected:
intrusive_ptr(rhs).swap(*this);
return *this;
}
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wuninitialized"
-#elif defined(__GNUC__) || defined(__GNUG__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#endif
+
intrusive_ptr(intrusive_ptr&& rhs) : t(rhs.t) { rhs.t = nullptr; }
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#elif defined(__GNUC__) || defined(__GNUG__)
-#pragma GCC diagnostic pop
-#endif
+
intrusive_ptr& operator=(intrusive_ptr&& rhs) {
intrusive_ptr(static_cast<intrusive_ptr&&>(rhs)).swap(*this);
return *this;
diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h
index d01d354c7c..bb8db76713 100644
--- a/be/src/vec/common/pod_array.h
+++ b/be/src/vec/common/pod_array.h
@@ -425,20 +425,8 @@ public:
/// Do not insert into the array a piece of itself. Because with the
resize, the iterators on themselves can be invalidated.
template <typename It1, typename It2, typename... TAllocatorParams>
void insert(It1 from_begin, It2 from_end, TAllocatorParams&&...
allocator_params) {
-// `place` in IAggregateFunctionHelper::streaming_agg_serialize is initialized
by placement new, in IAggregateFunctionHelper::create.
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wuninitialized"
-#elif defined(__GNUC__) || defined(__GNUG__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#endif
insert_prepare(from_begin, from_end,
std::forward<TAllocatorParams>(allocator_params)...);
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#elif defined(__GNUC__) || defined(__GNUG__)
-#pragma GCC diagnostic pop
-#endif
+
insert_assume_reserved(from_begin, from_end);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]