]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix vector index warning
authorChangcheng Liu <changcheng.liu@aliyun.com>
Mon, 27 Jul 2020 11:43:28 +0000 (19:43 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 27 Aug 2020 05:38:19 +0000 (13:38 +0800)
src/rgw/rgw_etag_verifier.cc: In member function ‘virtual int RGWPutObj_ETagVerifier_MPU::process(ceph::bufferlist&&, uint64_t)’:
src/rgw/rgw_etag_verifier.cc:58:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type
   58 |   if (next_part_index == part_ofs.size()) {
      |       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/rgw/rgw_etag_verifier.cc:76:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type
   76 |     if (next_part_index == part_ofs.size())
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/rgw/rgw_etag_verifier.h

index 560d54805af527acb781d45f8659ab505a16879f..b7fa71f4ef5f8b1f411124d4c32a23969b7c6e7e 100644 (file)
@@ -54,7 +54,7 @@ public:
 class RGWPutObj_ETagVerifier_MPU : public RGWPutObj_ETagVerifier
 {
   std::vector<uint64_t> part_ofs;
-  int cur_part_index{0}, next_part_index{1};
+  uint64_t cur_part_index{0}, next_part_index{1};
   MD5 mpu_etag_hash;
  
   void process_end_of_MPU_part();