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

laiyingchun pushed a commit to branch branch-1.17.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 483b22b508b0478a4c9708abfdb9b136cac11372
Author: kedeng <[email protected]>
AuthorDate: Tue Jul 11 14:56:39 2023 +0800

    [compile] fix a compile warning
    
    I noticed that there is a warning during the compile
    process:
    `
    
/data/github-kudu/kudu/src/kudu/integration-tests/auto_incrementing-itest.cc: 
In member function ‘virtual void 
kudu::itest::AutoIncrementingItest_BootstrapWalsDiverge_Test::TestBody()’:
    
/data/github-kudu/kudu/src/kudu/integration-tests/auto_incrementing-itest.cc:530:7:
 warning: operation on ‘j’ may be undefined [-Wsequence-point]
         j = ++j % kNumTabletServers;
         ~~^~~~~~~~~~~~~~~~~~~~~~~~~
    `
    Although it does not involve functional defects, it
    still needs to be fixed.
    
    As it does not involve any logic changes, no new unit
    tests have been added.
    
    Change-Id: I125674ad3bfcc14ae5077b84d6f3d01fcacd1e08
    Reviewed-on: http://gerrit.cloudera.org:8080/20182
    Reviewed-by: Alexey Serbin <[email protected]>
    Tested-by: Alexey Serbin <[email protected]>
    (cherry picked from commit 35aa458d7a5f67caf0ef4111408885fa5ba0b532)
    Reviewed-on: http://gerrit.cloudera.org:8080/20222
    Tested-by: Kudu Jenkins
---
 src/kudu/integration-tests/auto_incrementing-itest.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/integration-tests/auto_incrementing-itest.cc 
b/src/kudu/integration-tests/auto_incrementing-itest.cc
index 28879890f..1be177527 100644
--- a/src/kudu/integration-tests/auto_incrementing-itest.cc
+++ b/src/kudu/integration-tests/auto_incrementing-itest.cc
@@ -402,7 +402,7 @@ TEST_F(AutoIncrementingItest, BootstrapWalsDiverge) {
     vector<string> result;
     ASSERT_OK(ScanTablet(j, tablet_uuid, &result));
     results.emplace_back(result);
-    j = ++j % kNumTabletServers;
+    j = (j + 1) % kNumTabletServers;
   }
   ASSERT_EQ(kNumTabletServers, results.size());
   for (int i = 0; i < kNumTabletServers - 1; i++) {

Reply via email to