]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: silence StupidAllocator reorder warning 29866/head
authorJos Collin <jcollin@redhat.com>
Sun, 25 Aug 2019 03:04:59 +0000 (08:34 +0530)
committerJos Collin <jcollin@redhat.com>
Sun, 25 Aug 2019 05:06:53 +0000 (10:36 +0530)
warning: â€˜StupidAllocator::last_alloc’ will be initialized after [-Wreorder]

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/os/bluestore/StupidAllocator.cc
src/os/bluestore/StupidAllocator.h

index f75f74468a9ffd6d701446681ac7a579fbcd4acd..2660657d9e93480baa07dfb1d48118e47d72648f 100644 (file)
@@ -14,9 +14,8 @@ StupidAllocator::StupidAllocator(CephContext* cct,
                                  const std::string& name,
                                  int64_t _block_size)
   : Allocator(name), cct(cct), num_free(0),
-    free(10),
-    last_alloc(0),
-    block_size(_block_size)
+    block_size(_block_size),
+    free(10)
 {
 }
 
index d9c4a4478b632cc5ee3524115a9c232232b76501..3922a2e4d828e86df3c767513dc8e79ac402a1e1 100644 (file)
@@ -26,7 +26,7 @@ class StupidAllocator : public Allocator {
   typedef interval_set<uint64_t,interval_set_map_t> interval_set_t;
   std::vector<interval_set_t> free;  ///< leading-edge copy
 
-  uint64_t last_alloc;
+  uint64_t last_alloc = 0;
 
   unsigned _choose_bin(uint64_t len);
   void _insert_free(uint64_t offset, uint64_t len);