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

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

commit 435c519122661207f178d441b01f3f9f8c5dd6ad
Author: caiconghui <55968745+caicong...@users.noreply.github.com>
AuthorDate: Tue Jul 18 18:25:50 2023 +0800

    [fix](status) fix cmake warning with message 'Manually-specified variables 
were not used by the project:ENABLE_STACKTRACE' (#21932)
    
    Co-authored-by: caiconghui1 <caicongh...@jd.com>
---
 be/CMakeLists.txt      | 4 ++++
 be/src/common/status.h | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 9307e018f0..09f607b80a 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -531,6 +531,10 @@ if (USE_JEMALLOC)
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DUSE_JEMALLOC")
 endif()
 
+if (ENABLE_STACKTRACE)
+    add_compile_options(-DENABLE_STACKTRACE)
+endif()
+
 # STRICT_MEMORY_USE=ON` expects BE to use less memory, and gives priority to 
ensuring stability
 # when the cluster memory is limited.
 # TODO In the future, expect a dynamic soft memory limit, combined with 
real-time memory usage of the cluster,
diff --git a/be/src/common/status.h b/be/src/common/status.h
index cefc8d6402..6f49de3ec2 100644
--- a/be/src/common/status.h
+++ b/be/src/common/status.h
@@ -470,8 +470,8 @@ inline std::ostream& operator<<(std::ostream& ostr, const 
Status& status) {
     ostr << '[' << status.code_as_string() << ']';
     ostr << (status._err_msg ? status._err_msg->_msg : "");
 #ifdef ENABLE_STACKTRACE
-    if (status->_err_msg && !status->_err_msg._stack.empty()) {
-        ostr << '\n' << status->_err_msg._stack;
+    if (status._err_msg && !status._err_msg->_stack.empty()) {
+        ostr << '\n' << status._err_msg->_stack;
     }
 #endif
     return ostr;


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

Reply via email to