]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Align use of uint64_t in service_daemon::AttributeType 16948/head
authorJames Page <james.page@ubuntu.com>
Wed, 9 Aug 2017 09:04:37 +0000 (10:04 +0100)
committerJason Dillaman <dillaman@redhat.com>
Wed, 9 Aug 2017 15:42:15 +0000 (11:42 -0400)
size_t on a 32-bit architecture is a 32 bit unsigned int which
created ambiguity when casting to bool, uint64_t or std::string
(which are boost::variants for service_daemon::AttributeType).

Align to use of uint64_t to resolve compilation failures in
all 32-bit architectures.

Signed-off-by: James Page <james.page@ubuntu.com>
(cherry picked from commit 87fe8e81bc8c9b55c6bef4144714a33e042dc2f7)

src/tools/rbd_mirror/InstanceReplayer.cc
src/tools/rbd_mirror/PoolWatcher.h

index 097007231badf803344298aa0c3710977ff20d87..52e60605c758eac5dffa87f4422052f7e902a4e8 100644 (file)
@@ -333,9 +333,9 @@ void InstanceReplayer<I>::start_image_replayers(int r) {
     return;
   }
 
-  size_t image_count = 0;
-  size_t warning_count = 0;
-  size_t error_count = 0;
+  uint64_t image_count = 0;
+  uint64_t warning_count = 0;
+  uint64_t error_count = 0;
   for (auto it = m_image_replayers.begin();
        it != m_image_replayers.end();) {
     auto current_it(it);
index 51ee00e9add84934057116c29b3f1f7eeca5ad83..9a02bad4bd83ae4398767ff1d2761d8ed5f1f049 100644 (file)
@@ -52,7 +52,7 @@ public:
   void init(Context *on_finish = nullptr);
   void shut_down(Context *on_finish);
 
-  inline size_t get_image_count() const {
+  inline uint64_t get_image_count() const {
     Mutex::Locker locker(m_lock);
     return m_image_ids.size();
   }