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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 5fe28cc3094 [fix](compile) Fix gcc compile error about parentheses 
(#52869)
5fe28cc3094 is described below

commit 5fe28cc309498b54322780a02e61f3dfd1efbf69
Author: Siyang Tang <[email protected]>
AuthorDate: Mon Jul 7 20:56:54 2025 +0800

    [fix](compile) Fix gcc compile error about parentheses (#52869)
    
    ### What problem does this PR solve?
    
    Problem Summary:
    
    ```
    12:05:31   /root/doris/be/src/olap/rowset_version_mgr.cpp: In member 
function 'doris::Result<std::vector<doris::Version> > 
doris::BaseTablet::capture_consistent_versions_unlocked(const doris::Version&, 
const doris::CaptureRowsetOps&) const':
    12:05:31   /root/doris/be/src/olap/rowset_version_mgr.cpp:94:29: error: 
suggest parentheses around '&&' within '||' [-Werror=parentheses]
    12:05:31      94 |         if (tablet_id != -1 && (tablet_id == 
_tablet_meta->tablet_id()) || tablet_id == -2) {
    12:05:31         |             
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    12:05:31   /root/doris/be/src/util/debug_points.h:41:15: note: in 
definition of macro 'DBUG_EXECUTE_IF'
    12:05:31      41 |             { code; }                                    
                     \
    12:05:31         |               ^~~~
    12:05:31   cc1plus: all warnings being treated as errors
    ```
---
 be/src/olap/rowset_version_mgr.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/olap/rowset_version_mgr.cpp 
b/be/src/olap/rowset_version_mgr.cpp
index 27df2ede4b2..731287dcb00 100644
--- a/be/src/olap/rowset_version_mgr.cpp
+++ b/be/src/olap/rowset_version_mgr.cpp
@@ -91,7 +91,7 @@ static bvar::LatencyRecorder 
g_remote_fetch_tablet_rowsets_latency("remote_fetch
         if (skip_by_option && !options.enable_fetch_rowsets_from_peers) {
             return version_path;
         }
-        if (tablet_id != -1 && (tablet_id == _tablet_meta->tablet_id()) || 
tablet_id == -2) {
+        if ((tablet_id != -1 && tablet_id == _tablet_meta->tablet_id()) || 
tablet_id == -2) {
             return ResultError(Status::Error<VERSION_ALREADY_MERGED>("version 
already merged"));
         }
     });


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to