// prevent other gateways from attempting to trim for the duration
set_status("acquiring trim lock");
- // interval is a small number and unlikely to overflow
- // coverity[store_truncates_time_t:SUPPRESS]
yield call(new RGWSimpleRadosLockCR(store->svc()->rados->get_async_processor(), store,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, lock_oid),
"data_trim", lock_cookie,
+ // interval is a small number and unlikely to overflow
+ // coverity[store_truncates_time_t:SUPPRESS]
interval.sec()));
if (retcode < 0) {
// if the lock is already held, go back to sleep and try again later
// prevent others from trimming for our entire wait interval
set_status("acquiring trim lock");
- // interval is a small number and unlikely to overflow
- // coverity[store_truncates_time_t:SUPPRESS]
yield call(new RGWSimpleRadosLockCR(store->svc()->rados->get_async_processor(), store,
- obj, name, cookie, interval.sec()));
+ obj, name, cookie,
+ // interval is a small number and unlikely to overflow
+ // coverity[store_truncates_time_t:SUPPRESS]
+ interval.sec()));
if (retcode < 0) {
ldout(cct, 4) << "failed to lock: " << cpp_strerror(retcode) << dendl;
continue;
uint32_t max_skew = MAX_TOTP_SKEW_HOURS * 3600;
while (time_ofs_abs < max_skew) {
+ // coverity supression: oath_totp_validate2 is an external library function, cannot fix internally
+ // Further, step_size is a small number and unlikely to overflow
int rc = oath_totp_validate2(totp.seed_bin.c_str(), totp.seed_bin.length(),
start_time,
+ // coverity[store_truncates_time_t:SUPPRESS]
step_size,
time_ofs,
1,
nullptr,
pins[0].c_str());
if (rc != OATH_INVALID_OTP) {
- // oath_totp_validate2 is an external library function, cannot fix internally
- // Further, step_size is a small number and unlikely to overflow
- // coverity[store_truncates_time_t:SUPPRESS]
rc = oath_totp_validate2(totp.seed_bin.c_str(), totp.seed_bin.length(),
start_time,
+ // coverity[store_truncates_time_t:SUPPRESS]
step_size,
time_ofs - step_size, /* smaller time_ofs moves time forward */
1,
ASSERT_EQ(-EEXIST, r);
}
+ // coverity[store_truncates_time_t:SUPPRESS]
sleep(dur.sec());
ASSERT_EQ(0, l.lock_exclusive(&ioctx, oid));
int i;
for (i = 0; i < max; i++) {
+ // coverity[store_truncates_time_t:SUPPRESS]
uint32_t secs = start_time.sec();
if (modify_time)
secs += i;
utime_t get_time(utime_t& start_time, int i, bool modify_time)
{
+ // coverity[store_truncates_time_t:SUPPRESS]
uint32_t secs = start_time.sec();
if (modify_time)
secs += i;