From: Adam C. Emerson Date: Fri, 17 Jul 2020 00:33:28 +0000 (-0400) Subject: rgw: Fix sign comparison warning X-Git-Tag: v16.1.0~1661^2~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e0bd6325097e0da4ad1d0aef40fab384d7f44204;p=ceph.git rgw: Fix sign comparison warning Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_etag_verifier.cc b/src/rgw/rgw_etag_verifier.cc index 4db3ca03c05d..23f2037b23b7 100644 --- a/src/rgw/rgw_etag_verifier.cc +++ b/src/rgw/rgw_etag_verifier.cc @@ -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());