You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/01/26 04:54:10 UTC

[incubator-doris] branch master updated: [chore] fix error while compiling with -O3 (#7890)

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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new f227472  [chore] fix error while compiling with -O3 (#7890)
f227472 is described below

commit f227472db2d8ec207efac2fc144b08a969acb98f
Author: Henry2SS <45...@users.noreply.github.com>
AuthorDate: Wed Jan 26 12:53:56 2022 +0800

    [chore] fix error while compiling with -O3 (#7890)
---
 be/CMakeLists.txt       | 1 +
 be/src/vec/common/cow.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index b7cd148..cfe4a46 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -347,6 +347,7 @@ if (COMPILER_GCC)
     # https://stackoverflow.com/questions/67584073/gcc-11-false-array-subscript-is-partly-outside-array-bounds-warning
     # https://stackoverflow.com/questions/69426070/gcc-11-order-of-arguments-triggers-false-positive-wstringop-overflow-is-this-bu
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-array-bounds -Wno-stringop-overread")
+    add_compile_options(-Wno-stringop-overflow)
 endif ()
 
 if (COMPILER_CLANG)
diff --git a/be/src/vec/common/cow.h b/be/src/vec/common/cow.h
index 58ae14d..a235c64 100644
--- a/be/src/vec/common/cow.h
+++ b/be/src/vec/common/cow.h
@@ -147,9 +147,12 @@ protected:
             return *this;
         }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
         intrusive_ptr(intrusive_ptr&& rhs) : t(rhs.t) {
             rhs.t = nullptr;
         }
+#pragma GCC diagnostic pop
 
         intrusive_ptr& operator=(intrusive_ptr&& rhs) {
             intrusive_ptr(static_cast<intrusive_ptr&&>(rhs)).swap(*this);

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org