This is an automated email from the ASF dual-hosted git repository.

yiguolei 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 f72d2559cf [fix](compile) Fix compile error '<unknown>' may be used 
uninitialized in PODArray::insert_prepare #12202
f72d2559cf is described below

commit f72d2559cf5d8eeb0ef98a8cccf1ebc30b79225f
Author: Xinyi Zou <zouxiny...@gmail.com>
AuthorDate: Wed Aug 31 09:12:28 2022 +0800

    [fix](compile) Fix compile error '<unknown>' may be used uninitialized in 
PODArray::insert_prepare #12202
---
 be/src/vec/common/pod_array.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h
index 2f842040a6..3925644c11 100644
--- a/be/src/vec/common/pod_array.h
+++ b/be/src/vec/common/pod_array.h
@@ -450,7 +450,20 @@ 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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to