kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [kudu] 02/03: nvm_cache: fix initialization order warning
Date Mon, 27 May 2019 22:07:19 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 58d8772e97e26e47ca7c87a257daedb556e0785d
Author: Adar Dembo <adar@cloudera.com>
AuthorDate: Sun May 26 19:56:41 2019 -0700

    nvm_cache: fix initialization order warning
    
    Change-Id: I6eb34de666c7000e740f0345b3abf876a84247dc
    Reviewed-on: http://gerrit.cloudera.org:8080/13441
    Reviewed-by: Andrew Wong <awong@cloudera.com>
    Tested-by: Adar Dembo <adar@cloudera.com>
---
 src/kudu/util/nvm_cache.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/kudu/util/nvm_cache.cc b/src/kudu/util/nvm_cache.cc
index cde012c..208aee4 100644
--- a/src/kudu/util/nvm_cache.cc
+++ b/src/kudu/util/nvm_cache.cc
@@ -535,9 +535,8 @@ class ShardedLRUCache : public Cache {
 
  public:
   explicit ShardedLRUCache(size_t capacity, const string& /*id*/, memkind* vmp)
-        : vmp_(vmp),
-          shard_bits_(DetermineShardBits()) {
-
+      : shard_bits_(DetermineShardBits()),
+        vmp_(vmp) {
     int num_shards = 1 << shard_bits_;
     const size_t per_shard = (capacity + (num_shards - 1)) / num_shards;
     for (int s = 0; s < num_shards; s++) {


Mime
View raw message