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

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new 93ccdc370 fix: fix build failure on older Ubuntu&GCC versions (#1555)
93ccdc370 is described below

commit 93ccdc370519bbdbd272663b1799f7a2648c2c81
Author: liguohao <[email protected]>
AuthorDate: Mon Jul 3 14:36:10 2023 +0800

    fix: fix build failure on older Ubuntu&GCC versions (#1555)
---
 src/common/serialization_helper/thrift_helper.h |  4 ++--
 src/utils/test/metrics_test.cpp                 | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/common/serialization_helper/thrift_helper.h 
b/src/common/serialization_helper/thrift_helper.h
index acb2034ca..fe937d588 100644
--- a/src/common/serialization_helper/thrift_helper.h
+++ b/src/common/serialization_helper/thrift_helper.h
@@ -284,8 +284,8 @@ inline uint32_t 
rpc_address::write(apache::thrift::protocol::TProtocol *oprot) c
 inline uint32_t host_port::read(apache::thrift::protocol::TProtocol *iprot)
 {
     std::string host;
-    int16_t port;
-    int8_t type_enum_number;
+    int16_t port = 0;
+    int8_t type_enum_number = 0;
 
     uint32_t xfer = 0;
     auto binary_proto = dynamic_cast<apache::thrift::protocol::TBinaryProtocol 
*>(iprot);
diff --git a/src/utils/test/metrics_test.cpp b/src/utils/test/metrics_test.cpp
index b81a0ac8e..b2118f03e 100644
--- a/src/utils/test/metrics_test.cpp
+++ b/src/utils/test/metrics_test.cpp
@@ -3045,11 +3045,11 @@ TEST_P(MetricsRetirementTest, RetireOldMetrics)
 }
 
 const std::vector<surviving_metrics_case> metrics_retirement_tests = {
-    {"server_117", true, true, true, true},
-    {"server_118", true, true, true, false},
-    {"server_119", true, true, false, false},
-    {"server_120", true, false, false, false},
-    {"server_121", false, false, false, false},
+    {std::string("server_117"), true, true, true, true},
+    {std::string("server_118"), true, true, true, false},
+    {std::string("server_119"), true, true, false, false},
+    {std::string("server_120"), true, false, false, false},
+    {std::string("server_121"), false, false, false, false},
 };
 
 INSTANTIATE_TEST_CASE_P(MetricsTest,


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

Reply via email to