]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Fix sign comparison warning
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 00:33:28 +0000 (20:33 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 18:17:39 +0000 (14:17 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_etag_verifier.cc

index 4db3ca03c05d2f82ee2169ea76c4ea0931e6a7fe..23f2037b23b7c33f003bdfd03ac1ca77f76ccc74 100644 (file)
@@ -55,7 +55,7 @@ int RGWPutObj_ETagVerifier_MPU::process(bufferlist&& in, uint64_t logical_offset
   uint64_t bl_end = in.length() + logical_offset;
 
   /* Handle the last MPU part */
-  if (next_part_index == part_ofs.size()) {
+  if (size_t(next_part_index) == part_ofs.size()) {
     hash.Update((const unsigned char *)in.c_str(), in.length());
     goto done;
   }
@@ -73,7 +73,7 @@ int RGWPutObj_ETagVerifier_MPU::process(bufferlist&& in, uint64_t logical_offset
      * If we've moved to the last part of the MPU, avoid usage of
      * parts_ofs[next_part_index] as it will lead to our-of-range access.
      */
-    if (next_part_index == part_ofs.size())
+    if (size_t(next_part_index) == part_ofs.size())
       goto done;
   } else {
     hash.Update((const unsigned char *)in.c_str(), in.length());