as the left-hand operator is promoted to off_t which is a signed
integer, while rgw_max_chunk_size will be an unsigned after the
yaml-to-cxx migration. so let's cast it to `off_t` before comparing
them.
the same applies to rgw_copy_obj_progress_every_bytes.
Signed-off-by: Kefu Chai <kchai@redhat.com>
return cr;
}
++first_block;
- while (out_bl.length() - q_ofs >= cct->_conf->rgw_max_chunk_size)
- {
+ while (out_bl.length() - q_ofs >=
+ static_cast<off_t>(cct->_conf->rgw_max_chunk_size)) {
off_t ch_len = std::min<off_t>(cct->_conf->rgw_max_chunk_size, q_len);
q_len -= ch_len;
r = next->handle_data(out_bl, q_ofs, ch_len);
if (!s->cct->_conf->rgw_copy_obj_progress)
return;
- if (ofs - last_ofs < s->cct->_conf->rgw_copy_obj_progress_every_bytes)
+ if (ofs - last_ofs <
+ static_cast<off_t>(s->cct->_conf->rgw_copy_obj_progress_every_bytes)) {
return;
+ }
send_partial_response(ofs);