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

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f9b3e3e2 [compile] fix a compile warning
7f9b3e3e2 is described below

commit 7f9b3e3e29d951c35d4c28fe9f90b9f7cabe873f
Author: kedeng <kdeng...@gmail.com>
AuthorDate: Tue Jul 11 15:20:22 2023 +0800

    [compile] fix a compile warning
    
    I noticed that there is a warning during the compile process:
    `
    /data/github-kudu/kudu/src/kudu/client/client-test.cc: In member function 
‘virtual void 
kudu::client::ClientTestImmutableColumn_TestUpsert_Test::TestBody()’:
    /data/github-kudu/kudu/src/kudu/client/client-test.cc:9562:90: warning: 
‘iftmp.3716’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                                       update_immu_col_to_null_ ? nullopt : 
optional<int>(999));
    `
    
    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: Ib2c3d430b26e4c7961a54894429e09938c7ed692
    Reviewed-on: http://gerrit.cloudera.org:8080/20183
    Tested-by: Kudu Jenkins
    Reviewed-by: Alexey Serbin <ale...@apache.org>
---
 src/kudu/client/client-test.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/kudu/client/client-test.cc b/src/kudu/client/client-test.cc
index 8608c21c5..2ba7f3c89 100644
--- a/src/kudu/client/client-test.cc
+++ b/src/kudu/client/client-test.cc
@@ -9491,10 +9491,13 @@ TEST_P(ClientTestImmutableColumn, TestUpsert) {
     EXPECT_EQ(expect_row, rows[0]);
   }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
   // Perform an UPSERT. This upsert will attemp to update an immutable column,
   // which will result an error.
   Status s = ApplyUpsertToSession(session.get(), client_table_, 1, 4, 
"upserted row 3",
                                   update_immu_col_to_null_ ? nullopt : 
optional<int>(999));
+#pragma GCC diagnostic pop
   ASSERT_TRUE(s.IsIOError()) << s.ToString();
   ASSERT_STR_CONTAINS(s.ToString(),
                       "failed to flush data: error details are available "

Reply via email to