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

wutao 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 f4bb059  fix: build failure on clang9 (#711)
f4bb059 is described below

commit f4bb05927ae3a98e020b5ae51418c0a0a89440a0
Author: Wu Tao <[email protected]>
AuthorDate: Thu Apr 1 22:54:18 2021 -0500

    fix: build failure on clang9 (#711)
---
 src/geo/lib/geo_client.cpp                  | 2 +-
 src/redis_protocol/proxy_lib/redis_parser.h | 4 ++++
 src/server/capacity_unit_calculator.h       | 2 ++
 src/server/hotkey_collector.h               | 2 ++
 src/server/pegasus_server_impl.cpp          | 2 +-
 src/shell/command_utils.h                   | 2 +-
 src/test/bench_test/statistics.h            | 2 --
 7 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/geo/lib/geo_client.cpp b/src/geo/lib/geo_client.cpp
index 4b295dc..cac7b78 100644
--- a/src/geo/lib/geo_client.cpp
+++ b/src/geo/lib/geo_client.cpp
@@ -319,7 +319,7 @@ void geo_client::async_del(const std::string &hash_key,
                 del_count->fetch_sub(1);
             }
             if (del_count->load() == 0) {
-                cb(PERR_OK, std::move(pegasus_client::internal_info()));
+                cb(PERR_OK, pegasus_client::internal_info());
                 return;
             }
 
diff --git a/src/redis_protocol/proxy_lib/redis_parser.h 
b/src/redis_protocol/proxy_lib/redis_parser.h
index 811ffdc..d21c720 100644
--- a/src/redis_protocol/proxy_lib/redis_parser.h
+++ b/src/redis_protocol/proxy_lib/redis_parser.h
@@ -31,6 +31,8 @@ class rrdb_client;
 }
 }
 
+class proxy_test;
+
 namespace pegasus {
 namespace proxy {
 
@@ -38,6 +40,8 @@ namespace proxy {
 class redis_parser : public proxy_session
 {
 protected:
+    friend class ::proxy_test;
+
     struct redis_base_type
     {
         virtual ~redis_base_type() = default;
diff --git a/src/server/capacity_unit_calculator.h 
b/src/server/capacity_unit_calculator.h
index ebab91d..f86b0a4 100644
--- a/src/server/capacity_unit_calculator.h
+++ b/src/server/capacity_unit_calculator.h
@@ -35,6 +35,8 @@ public:
                              std::shared_ptr<hotkey_collector> 
read_hotkey_collector,
                              std::shared_ptr<hotkey_collector> 
write_hotkey_collector);
 
+    virtual ~capacity_unit_calculator() = default;
+
     void add_get_cu(int32_t status, const dsn::blob &key, const dsn::blob 
&value);
     void add_multi_get_cu(int32_t status,
                           const dsn::blob &hash_key,
diff --git a/src/server/hotkey_collector.h b/src/server/hotkey_collector.h
index bdc7fcb..92b140b 100644
--- a/src/server/hotkey_collector.h
+++ b/src/server/hotkey_collector.h
@@ -126,6 +126,8 @@ class internal_collector_base : public 
dsn::replication::replica_base
 {
 public:
     explicit internal_collector_base(replica_base *base) : 
replica_base(base){};
+    virtual ~internal_collector_base() = default;
+
     virtual void capture_data(const dsn::blob &hash_key, uint64_t weight) = 0;
     virtual void analyse_data(detect_hotkey_result &result) = 0;
     virtual void clear() = 0;
diff --git a/src/server/pegasus_server_impl.cpp 
b/src/server/pegasus_server_impl.cpp
index 4f9fbe5..2be1e8a 100644
--- a/src/server/pegasus_server_impl.cpp
+++ b/src/server/pegasus_server_impl.cpp
@@ -1539,7 +1539,7 @@ void pegasus_server_impl::on_clear_scanner(const int64_t 
&args) { _context_cache
         _update_server_rdb_stat = ::dsn::tasking::enqueue_timer(
             LPC_REPLICATION_LONG_COMMON,
             nullptr, // TODO: the tracker is nullptr, we will fix it later
-            [this]() { update_server_rocksdb_statistics(); },
+            []() { update_server_rocksdb_statistics(); },
             kServerStatUpdateTimeSec);
     });
 
diff --git a/src/shell/command_utils.h b/src/shell/command_utils.h
index b3d34f0..3393de0 100644
--- a/src/shell/command_utils.h
+++ b/src/shell/command_utils.h
@@ -29,7 +29,7 @@
 namespace dsn {
 class rpc_address;
 }
-class shell_context;
+struct shell_context;
 
 inline bool validate_cmd(const argh::parser &cmd,
                          const std::set<std::string> &params,
diff --git a/src/test/bench_test/statistics.h b/src/test/bench_test/statistics.h
index a669766..238e731 100644
--- a/src/test/bench_test/statistics.h
+++ b/src/test/bench_test/statistics.h
@@ -40,8 +40,6 @@ public:
 private:
     uint32_t report_step(uint64_t current_report) const;
 
-    // thread id which controls this statistics
-    int _tid;
     // the start time of benchmark
     uint64_t _start;
     // the stop time of benchmark

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

Reply via email to