[chore] fix error while compiling with -O3 (#7890)
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user